filtering contents of listbox when form opens

I have a form with a listbox.  The form is opened by a call from
another form. I would like to filter the contents of the list box with
either openargs  (or something similar). I know how to pass the value
with openargs but not sure how to apply the value to filter listbox
contents.  Any suggestions would be appreciated.  Thanks BRC

0
BRC
7/7/2007 7:14:06 PM
access.formscoding 7493 articles. 0 followers. Follow

2 Replies
1580 Views

Similar Articles

[PageSpeed] 29

Assign the openargs value to a variable, then use the variable in a sql 
string to make it the listbox's rowsource.
For example, (pseudo code)
mystr= me.openargs
strsql="Select  yourfields from table where field =mystr"
me.listbox.rowsource= strsql

Damon


"BRC" <sgos4v-googrp@yahoo.com> wrote in message 
news:1183835646.629857.73380@e9g2000prf.googlegroups.com...
>I have a form with a listbox.  The form is opened by a call from
> another form. I would like to filter the contents of the list box with
> either openargs  (or something similar). I know how to pass the value
> with openargs but not sure how to apply the value to filter listbox
> contents.  Any suggestions would be appreciated.  Thanks BRC
> 


0
Damon
7/7/2007 7:51:16 PM
On Jul 7, 12:51 pm, "Damon Heron" <damon_...@hotmail.com> wrote:
> Assign the openargs value to a variable, then use the variable in a sql
> string to make it the listbox's rowsource.
> For example, (pseudo code)
> mystr= me.openargs
> strsql="Select  yourfields from table where field =mystr"
> me.listbox.rowsource= strsql
>
> Damon
>
> "BRC" <sgos4v-goo...@yahoo.com> wrote in message
>
> news:1183835646.629857.73380@e9g2000prf.googlegroups.com...
>
>
>
> >I have a form with a listbox.  The form is opened by a call from
> > another form. I would like to filter the contents of the list box with
> > either openargs  (or something similar). I know how to pass the value
> > with openargs but not sure how to apply the value to filter listbox
> > contents.  Any suggestions would be appreciated.  Thanks BRC- Hide quoted text -
>
> - Show quoted text -

Thanks Damon, problem solved

0
BRC
7/8/2007 5:57:51 PM
Reply:

Similar Artilces:

Outlook form controls
I added a Microsoft Excel spreadsheet control to an outlook form and published the form to a personal folder. The form was based on a Task template. I added a new Task folder and set it to open the new form with the Excel control. When I tried to use the form, the data entered into the Excel spreadsheet would not "bind" with the form after saving. Is there someway to save the data in the Outlook 2003 form so that each time the form is opened is will have the data from the last time that instance of the form was saved? ...

Distribute campaign activity with a custom form
Hi all, I need to customize the "letter" activity form with new fields. Then within a campaign, I want to distribute using the canal "letter" a campaign activity but unfortunatly, CRM cancels the distributing process with the error : "L'opération Campagne rapide n'a pas pu être exécutée en raison d'une erreur : 0x80041103. Pour plus d'informations, contactez votre administrateur système." It works perfectly if I leave the letter custom fields empty before distribution, but if I want to fill these fields with a defaul...

Exchange Intelligent Message Filter
Hi All, I know there are performance monitors and events log but I can't find any logs for the IMF Is there any log for the IMF ? According to the deployment whitepaper, performance and event logs are the only "log" areas. "Idan" <idan_le@hotmail.com> wrote in message news:OmrN5F5SEHA.3768@TK2MSFTNGP11.phx.gbl... > Hi All, > > I know there are performance monitors and events log but I can't find any > logs for the IMF > Is there any log for the IMF ? > > ...

help with filtering
Hi, How do I use the autofilter to show me three items. It only seems allow me two when I use the custom filter. thanks Susie Hi do you mean 3 conditions?. If yes this is not possible with the autofilter -- Regards Frank Kabel Frankfurt, Germany Susie wrote: > Hi, > > How do I use the autofilter to show me three items. It > only seems allow me two when I use the custom filter. > > thanks > > Susie Susie, Advanced filter may be the answer http://www.techonthenet.com/excel/filters/advanced2.htm Barbara Susie wrote: > Hi, > > How do I use the autofilter...

Outlook Views & Filters
We're using Exchange public folders & Outlook with various languages. Our views were setup in English and it seems Outlook views are language specific. Views setup with criteria (filtering views) in English fail to work properly on a German Windows machine. I have not located any posts on this issue. Can anyone provide some help or a solution? Thanks! Fred ...

Monitoring opening of all windows
Is it feasible to monitor the opening of all windows on a system? I would like to write an application that simply passively waits for a specific window to open, then immediately closes it. Beyond that, it should merely do nothing other than be ready to close it again if the same window should open again. What is the most efficient way to do such a thing. I don't want my application to incur a lot of overhead. Thanks, Ray Mitchell ...

add size option to excel form checkbox
After fielding numerous complaints about the loss of this feature, Please return the ability to change the actual size of the checkbox (the GRAPHIC) so that forms don't end up printing and displaying in an unbalanced manner. The simplest implementation would be to allow the box to scale with the grab points. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestio...

Opening file question
When opening a file direct from my documents excel opens but the sheet does not get displayed. Although if you then click print preview the content of the sheet is there. Tried opening excel and then opening file and this works fine. Not a major problem but annoying. Any one shed any light? Cheers, Ash. I think xl is trying to help you. Excel wants to keep the window settings the same way as they were previously. If you saved your workbook in less than a full window, then the next time you open it (via double clicking with no existing xl instance running), it will open it the same win...

Excel open file as text
is there a way to tell excel when opening new file, treat is as text? i.e. even if there is a 00000 value leave it the way it is New workbooks don't have values. Do you mean open a *.txt file in Excel and have values treated as Text. Open the *.txt file and the Text Import Wizard will pop up. In Step 3 select all columns(Shift + click).......Column Data Format>Text. Finish. Gord Dibben MS Excel MVP On Fri, 11 Dec 2009 11:52:38 -0800 (PST), "alexseys@gmail.com" <alexseys@gmail.com> wrote: >is there a way to tell excel when opening new fil...

setting custom footer in This Workbook that opens everytime (default template)
Hello: I'd like to have a default template that everytime it's open has code in the This Workbook. The code I have sets a custom footer with the username and I want this to be attached to the workbook so when I e-mail the file, the new users will have the same functionality. I made a workbook called "Book1.xlt" and saved it in my XLStart folder with the custom footer code in the This Workbook, but when I restarted XL the code was not in my new workbook. Hi Pablo > I made a workbook called "Book1.xlt" and saved it in my XLStart folder must be "Book.xlt&...

Office 2007
locast installed Office 2007 on a new WIndows 7 machine. The installation went through without error. But now I cannot open any of the Office 2003 files. The error I get is as below. The files are on a local drive and not read only. Excel cannot open the file <filename>. The document may be read-only or corrupted. <filename> cannot be accessed. THe file may be corrupted, located on a server that is not responding or read only. Please help. Thanks much. Are you the owner of the folder in question? omsoft wrote: > locast installed Office 2007 on a new ...

"Filtered" Views Behavior in CRM 4.0
We have recently upgraded our CRM3.0 to CRM4.0 on a test machine for evaluation purposes. We used to use some of those built in "Filtered..." views in CRM to obtain certain formatted data. During my investigation I found that these are not operating as expected in CRM 4.0. I will give an example: We used to access a view named: "FilteredQuote" , this used to display a lot of summarized information about quotes including FreightTermNames I discovered that all those "CodePLTable" such as FreightTermsCodePLTable, that suppose to return the label (name or c...

trying to open .CHM help file
Can anyone help me please? i am trying to open a .CHM help file via a command button on my form. I have tried using SHELL but that doesnt work, presumably because it is not a .EXE. any help greatly appreciated Already answered in another newsgroup to which you posted the same question. If you feel you need to post to more than one group (HINT: it's seldom necessary), please have the courtesy to cross-post (send the one message to all groups at once), rather than multi-post (send individual messages to each group). In this way, all responses to your post will be available together, ...

Questions RE: Intellegent Message Filtering
I've been working with IMF for about a week now and have it tweak fine for our organization. I do, however, have a couple of questions. During the past week I've had IMF set to Archive rejected email so I could review them and tweak my threshold as necessary. I'm now satisfied with what is being rejected and would like to know if I should change the action to Delete or Reject? Is it possible to change the NDR text? I'd rather it say something like "Recipient does not exist" instead of "message refused" If I set it to reject will the sender assume t...

I upgraded Outlook 2003 to 2007, now the program will not open up
I upgraded a trial version of Office Small Business Edition 2003 to Office Small Business Edition 2007. Everything except my Outlook program works. When I try to start Outlook, the error message indicates that Microsoft Contact Manager has experienced a problem and needs to close. I uninstalled Office 2007 and lost everything related to Office 2003. Any thoughts or suggestions? WillR <WillR@discussions.microsoft.com> wrote: > I upgraded a trial version of Office Small Business Edition 2003 to > Office Small Business Edition 2007. Everything except my Outlook > progra...

Excel found unreadable content in 'stock.chart.object.xlsm'
When I create a secondary axis [because I want to overlay a moving average on the bars] and save the workbook the chart is unrecoverable when I try to reload the workbook later. I get a message saying "Excel found unreadable content in 'stock.chart.object.xlsm'. Do you want to recover the contents of this workbook?" When I reply 'yes' the spreadsheet is displayed without the chart. A 'no' reply loses the entire workbook. I have tested it enough in various ways to feel confident that it is probably the secondary axis addition that is the problem. Any su...

How to open a large excel file?
I have a large excel(66MB), but when i try to open it I find that Excel can onle open no more than 65000 row data.I also try to load the excel file from Access,but it also cann't run.So how can I load the data in the file without 65000 row data? Die Tastatur von alex lee wurde wie folgt gedr´┐Żckt: > I have a large excel(66MB), but when i try to open it I find that > Excel can onle open no more than 65000 row data.I also try to load > the excel file from Access,but it also cann't run.So how can I load > the data in the file without 65000 row data? What you describe is...

Matching cells by content then cell fill with color
Thanks to JEM, I am using this routine to color three consecutive cell a specific color, in this case red: Public Sub ThreeCellsRed() ActiveCell.Resize(1,3).Interior.ColorIndex = 3 End Sub What I need now is a way for the routine to continue to find all th similar cells, let's say for sake of disc they are people's names, s when I execute the above on my name, mrh, I want it to continue in th worksheet and find all exact matches and color those same cells red. Another thought, say my name (MRH) is in "A1" and it is also in "D1". But in "D1" I use "...

Spam Filter for Outlook 2003, Recommendations?
I have Outlook main window > Tools > Options > Junk E-mail > set to Low because I'm scared I'll miss something if I set to High. I really don't know how High works. What kind of spam filters are available for Outlook 2003 that would block a message like the one represented below? The sender keeps changing its e-address so blocking that won't help. Should I use something that looks at the subject line? Header of a sample spam message (with my own addy munged): X-Kaspersky: Checked Return-path: <b.ConfirmAccounts.0-72dcaea-2122.kc.rr.com.-nehmo@001.theeconfirm....

Open Mailbox after Disabling user account
Is there a way to Open a users mailbox after the AD user account has been disabled? Or then reenabled? I tried both and it just states that it cannot expand the folders. I'm trying to add the mailbox to another users Outlook 2003 Client (using Exchange Server) and selecting the previously disabled account in the "Open these additional mailboxes" listbox. What is the best procedure should you want to disable the account, and still have access to the old mail messages? Any help is appreciated. Hi, If you add the associated external account permission to the disabled users ...

How to insert Open File action in the IF Function?
Hello, How can I insert the Open File action (w/o any other messages) in the IF function - =IF (A1=A2,"C:\TRUE.WAV","C:\FALSE.WAV") or smth like that. I don't know how to write a Macros at all, so if anyone willing to write it for me I'll be grateful, though explanations will be required. My global problem is that I get some data from the web (the links are refreshing automatically) and I wanna do some kind of check - if the data is useful for me than a sound will be played to inform me, if not - silence. http://support.microsoft.com/default.aspx?scid=kb;en-u...

Unable To Add Records Via Form
Hello, I'm fairly new to Access so I'm not sure if this is an easy one for all of you... I'm running Access 2003. I have two tables and created a relationship between 1 field in table1 and 1 field in table2. The type of relationship is to only display rows where the fields are equal. I created a form using fields from table1 and table2. The data displays correctly in the form, however when I try to add a new record the add record arrow is greyed out. Also, if I try to edit any existing fields, it does not allow me to. No error, just unable to edit the fields. Is ther...

Lose formatting in listbox
We have a listbox with several columns that populate when the form loads. One column has a yes/no data type and it gets its value from a check box. The list has always read "Yes" or "No", but now it's listing the -1 or the 0. I changed the field's format from true/false to yes/no, but that had no effect. I also tried formatting the row source using "Iif" (ColumnName: iif([Field], "Yes", "No"), but that had no effect. The data sits on a 2000 Server, the clients have XP w/Office 2003. The machines were put in production 5 months a...

Problems linking the fields in two forms
I created a command button on my form so that I can open up another form to save space and make it look neater on my main form. The common field between these two forms is the PO (Purchase Order) number but the subform that opens up does not autopopulate that same number from the primary form - how can I fix this? -- Kenji Could you explain how you open the secondary form (not subform)? Macro? What action(s)? Code? What lines? -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at m...

Opening A Database
Hia! Friends! How are you! Microsoft has saved you on Sat, Sun and most of the Monday. I could not post any questions! Anyway I have been struggling with something else and am no where near to solve it!!! Please see the below given codes; they create database in the workspace. However I am not able to bring it to the user interface programmatically!!! Sub WorkingWithSecondDatabase() Dim wrkAcc As Workspace Dim dbsNorthwind As Database Set wrkAcc = CreateWorkspace("", "admin", "", dbUseJet) Set dbsNorthwind = wrkAcc.OpenDatabase(&qu...