Combo box list selection based on earlier selection by user

HI,

I have a form that has a combo box 1 (Product) that reads a the Product 
table and has a unique id attached to each product (RO#). There is a second 
combo box 2 that is RO#. Now what I would like to do is when a user selects a 
Product in combo box 1, the system should lookup the Product selected from 
combo box 1 and upload the corresponding RO# in the combo box 2 list. Now I 
am using both combo boxes as Unbound and in the combo box 2 I have the two 
columns Product and RO# - in the Criteria row of RO# I have the following:

Like IIf([Forms]![xa_f_lookup]![RO#]=" ",[Forms]![xa_f_lookup]![RO#])

But it does not seem to work as when I select a Product in combo box 1, the 
list in combo box 2 is empty. Could some one please guide and assist, thanks.

MSA
0
Utf
2/26/2008 10:47:01 AM
access.formscoding 7493 articles. 0 followers. Follow

2 Replies
1080 Views

Similar Articles

[PageSpeed] 7

In the after update event of combo box 1, put the following code:

Me.[combo box 2].requery

Replace [combo box 2] with the name of the control on your form.

HTH,
Chris

"MSA" wrote:

> HI,
> 
> I have a form that has a combo box 1 (Product) that reads a the Product 
> table and has a unique id attached to each product (RO#). There is a second 
> combo box 2 that is RO#. Now what I would like to do is when a user selects a 
> Product in combo box 1, the system should lookup the Product selected from 
> combo box 1 and upload the corresponding RO# in the combo box 2 list. Now I 
> am using both combo boxes as Unbound and in the combo box 2 I have the two 
> columns Product and RO# - in the Criteria row of RO# I have the following:
> 
> Like IIf([Forms]![xa_f_lookup]![RO#]=" ",[Forms]![xa_f_lookup]![RO#])
> 
> But it does not seem to work as when I select a Product in combo box 1, the 
> list in combo box 2 is empty. Could some one please guide and assist, thanks.
> 
> MSA
0
Utf
2/26/2008 12:19:01 PM
Hi Chris,

Thanks for your input. When I tried to use your suggestion I keep getting an 
error message that Me Macro is not found. Secondly, nothing comes up in the 
second combo list as filtered, it shows all.

Let me, try to explain by example as some requirements have also changed:

I have a combo box 1 called Product, having the following enteries each with 
a unique RO#:
Product: A  Ro#: 1
             B           2
             C           3

Now, based on the Product selected from the above list an RO# should be 
automatically loaded in the RO# field, maybe not a combo box as stated 
earlier.
The other thing is that if a user decides to change the selection in Product 
 combo box  prior to saving e.g.

User selects Prod=A
Ro# should be filled with "1"

Now the user decides to change the Product selection to: C
RO# should detect the change update accordingly by filling it with "3".

Please let me how best this can be done, thanks in advance.

Regards,
MSA


"Chris" wrote:

> In the after update event of combo box 1, put the following code:
> 
> Me.[combo box 2].requery
> 
> Replace [combo box 2] with the name of the control on your form.
> 
> HTH,
> Chris
> 
> "MSA" wrote:
> 
> > HI,
> > 
> > I have a form that has a combo box 1 (Product) that reads a the Product 
> > table and has a unique id attached to each product (RO#). There is a second 
> > combo box 2 that is RO#. Now what I would like to do is when a user selects a 
> > Product in combo box 1, the system should lookup the Product selected from 
> > combo box 1 and upload the corresponding RO# in the combo box 2 list. Now I 
> > am using both combo boxes as Unbound and in the combo box 2 I have the two 
> > columns Product and RO# - in the Criteria row of RO# I have the following:
> > 
> > Like IIf([Forms]![xa_f_lookup]![RO#]=" ",[Forms]![xa_f_lookup]![RO#])
> > 
> > But it does not seem to work as when I select a Product in combo box 1, the 
> > list in combo box 2 is empty. Could some one please guide and assist, thanks.
> > 
> > MSA
0
Utf
2/27/2008 5:00:01 PM
Reply:

Similar Artilces:

List box
I am trying to use the list box function from the control toolbar. I am not sure how to get the listings I want in the list box. Is there certain VB coding that is needed? Any help will be appreciated. Thanks. Todd No VBA code needed. In Design mode, click on your list box and select Properties from the Control toolbox (or right-click your list box and select Properties), then scroll down to the ListFillRange Property and indicate the cell range address that has the items you want to appear in the box (i.e., A1:A10). Then exit out of design mode and test your list box. MRO "Tod...

creat an address list for mail merge
I am trying to creat an address lis for mail merge. Microsoft office publisher this operation cannot be completed because of dialog or data base engine failures please help. Also can not connect to the data source What version of Windows and Publisher are you using!!! Use a Spreadsheet and do a Save As CSV (Comma Separated Values) -- ...

how do i view different mail boxes
I have set up different email accounts in outlook 2000. How do I choose which mail box I view when I go to outlook? btoonhoule <btoonhoule@discussions.microsoft.com> wrote: > I have set up different email accounts in outlook 2000. How do I > choose which mail box I view when I go to outlook? Using IMO or C/W mode? -- Brian Tillman ...

Concatenate Multi-Select List Box Items
I need to use the chosen items in a multi-select List Box as concatenated text in another control on a subform. This text will be part of a large amount of concatenated text. How do I do this? I did find info here about using such items in a query but it was way over my head and I couldn't figure out how to convert that idea to this issue so please don't just refer me to that w/o some other explanation for this novice. For example, if the user selects: Frt Bumper, Grille, & Headlamp in the List Box, I want to then somehow concatenate those selections into a sente...

Filtering a combo box using a combo box
All, I am trying to filter the records from a table displayed in a combo box using a combo box on the same form. I built a query and set the criteria as Me![FormName]![Combo_box]. This allowed me to filter the list, but it did not do exactly what I wanted. When the first combo box is blank, the second one is also blank. Is there anyway I can get the second combo box to display all of the records when the first box is blank? Thank you for your help. Regards, John Try a criteria in the second combo of: Like Forms!YourFormName!Combo1Name & "*" -- Arvin Meyer, MCP, MVP http:/...

Setting a default User in a look-up
Hello, Could someone tell me me the easiest way to set a default user in a look-up. What I want to do is recreate the owner field. I need two look-ups on a form to list the owner by default. Thanks! -- Allin Consulting Consultant, CRM ...

How to prevent list item selection
I'm having one of those blond moments (no offense to any blonds). I have a simple list box to display information. I want to immediately unselect any item that is selected. None of the obvious items I've tried worked. Any suggestions? Set the value to -1 "Robert Flanagan" <nospam@nospam.net> wrote in message news:%23wM31jHeKHA.6096@TK2MSFTNGP02.phx.gbl... > I'm having one of those blond moments (no offense to any blonds). I have > a simple list box to display information. I want to immediately unselect > any item that is sel...

Question for very smart Outlook users
Is there any way I can have Outlook e-mail my schedule (from the Outlook calendar) to an e-mail recepient automatically each day? Maybe, but that is the best answer you are going to get without posting some details, especially your Outlook version. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the (insert latest virus name here) virus, all mail sent to my personal account will be deleted without reading. After searching google.groups.com and finding no answer, BPra666 asked: | Is there any way I can have Outlook e-mail my schedule ...

colour change of dated box
How can I change the colour of a dated box of excel after the date is over. I want the programme to read date automatically from pc and change colour. try Conditional Formatting In 2003: 1. Select the cells you want to format 2. Choose Format, Conditional Formatting 3. Choose Cell Value Is from the first drop down 3. Choose Formula is from the first drop down 4. Choose less than 5. In the third box, enter =TODAY() 6. Click the Format button 7. Choose a color on the Patterns tab (or any available option) 7. Click OK twice. -- Hope this is helpful Appreciate that you provide your feedbac...

Combo Box on Forms
Hi, I am using a combo box on a form that has several items w/ one being Other. If the user selects other I want them to be able to input what they want so that it will go into the table instead of just the "Other". I just am not really sure on how to do that. Can you help? Thanks, Jaime In design view click on VIEW - Properties and the the combo. Then change Limit To List to No. -- KARL DEWEY Build a little - Test a little "jseger22@yahoo.com" wrote: > Hi, > > I am using a combo box on a form that has several items w/ one being > Other. If the use...

Is it possible to conditionaly format based on the data label?
I've been searching this board to find an answer and all the post (so far) are helpful but they don't quite get me to where I need to be. That said... I have a 3d plain Jane bargraph. The data is linked to cells, and I physically change the graph at the begining of every month( add to the data series). When I add the new data the series points may change but the individual bars do change color. Long story longer...How can I keep the series the same format (keep"defective equipment" for Feb - June blue) through out the graph no matter what changes are made. I wou...

sent box
how do i get the emails in the sent box to show sent to instead of sent from? -- deb deb wrote: > how do i get the emails in the sent box to show sent to instead of sent from? Add/remove whatever columns you want. Right-click on the header row and select Field Chooser. i may have not explained myself too well i dont want to sort by the "to" column i want the header on the email to show "to" not "from" i think the problem might be that this is not the default sent file, its just a folder named "sent" its for my boss, he ha...

How to retrieve earlier saved copies of a document 12-01-09
I wrote over part of an old document, and pressed "save." I meant to press "save as." Now my old document is gone. Is there any way to get it back? "Don" wrote: > I wrote over part of an old document, and pressed "save." I meant to press > "save as." Now my old document is gone. Is there any way to get it back? ...

Is it supposed to be like this?
Hiya, I was wondering if I was supposed to have so many inboxes. Is that what you have? There is mail in the inbox that isn't in bold, but it could be moved, and not that important...... Thanks... On Sat, 10 Dec 2005 11:17:10 -0800, moochito@invalid.hotmail.com wrote: >Hiya, > >I was wondering if I was supposed to have so many inboxes. Is that >what you have? > >There is mail in the inbox that isn't in bold, but it could be moved, >and not that important...... > >Thanks... The attatchment didn't upload before. On Sat, 10 Dec 2005 11:17:10 -080...

Combo Boxes
Someone sent me an Excel document where each of the cells in I1:I312 are combo boxes. When you click off of those cells, the down arrow disappears. The list for the combo boxes are cells AA1 and AB1 (AA1 is New and AB1 is Existing). Please explain how this was done? Also, can you please tell me if it is possible to make New and Existing autocorrect entries. So even though the choices are New and Existing, if you hit N, New appears, and if you hit E, Existing appears. Thanks!! It sounds like Data|Validation. Take a look at Debra Dalgleish's site: http://www.contextures.com/xlDataVa...

Separator in combo box
hi, Is it possible to have a line separator in a combo box? I mean something like a separator in menus? thanks, Behzad Try :- http://www.codeproject.com/combobox/zsepcmb.asp http://www.codeproject.com/combobox/customcombo.asp -- Regards, Nish [VC++ MVP] http://www.voidnish.com /* MVP tips tricks and essays web site */ http://blog.voidnish.com /* My blog on C++/CLI, MFC, Whidbey, CLR... */ "behzad" <b@b.com> wrote in message news:%23fVB3em5EHA.3368@TK2MSFTNGP10.phx.gbl... > hi, > Is it possible to have a line separator in a combo box? I mean something > like...

Edit box should support languages like japanese,chineese etc
Hi wht im trying to ask is.. 1. In my application, all the labels r in english only. 2.If i change the content of one text box in japanese or chineese language , [Text box value is the title for another dialog] 4.After i changed the content, i want the title to be displayed in japanese or chineese language. Note: I want only that text box to be changed ,,not the entire application.. so How can i able to support multibyte characters in MFC controls CEdit --text boxes.. Plz reply They do. You have to be in a Unicode app, and you have to have selected a Unicode font that has Chin...

Text boxes on graphs
How do you make a text box hide the grid lines behind it on a graph? The grid lines are still visible and run through the text box, cluttering it up. Thanks right-click text box choose -- 'Format Text Box' from shortcut menu colors and lines tab change fill color to white Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day :) * Drew wrote: > How do you make a text box hide the grid lines behind it on a graph? The > grid line...

Not In List
I have a Form called Assets, on this form I have a field called LOSS PAYEE ID, this is an actual field name on my table called Assets which the form is created from. The field looks the LOSSNAME from my LOSSPAYEE table to give me a list of names on my form. My LOSSPAYEE table also has fields called address, phone, fax postal code & contract/loan #. While I am in my Assets form I would like to be able to type in a new LOSSNAME and have a seperate form pop up so I can enter the phone, address, etc info for the new name I just entered. Can anyone help me with this? On my website (w...

Multiple Combo Boxes Highlighted
Hi, I have a problem with something in VB6. I have 4 combo boxes with individual names (not an array) located on an SSTab object. When I select another tab and then return to the tab these boxes are located on, each of them appears to be highlighted in blue. I add values to them only when loading the form so I'm at a loss as to why this happens ? Any ideas are greatly appreciated. Thanks, Jen. "Jennifer Ward" <jward@comcast.net> wrote in message news:eq5HrcBrKHA.6064@TK2MSFTNGP02.phx.gbl... > Hi, > > I have a problem with someth...

HELP !! Combo box to feed other combo boxes
Hi, I have a form with a stock list. One field is [Dealer Allocated] so stock can be allocated to a specific dealer - this is a combo box (combo1) for single allocations. I now also want to be able to update this combo box for several records in bulk. I thought I would do this by having a second combo box in the footer of the form which the user selects the dealer from and then clicks a button which looks for first record without dealer allocated and updates the value of combo1 to the value of combo2. This would then be enclosed in a Do Loop for specified number of records. I can...

list mails sorted on date, independent of subfolder structure of INBOX
I hav e a lot of mail rules that sort incoming mails in subfolders of the INBOX. But now I want to see a list of all mails, sorted on date, independent of the folder structure of the INBOX. Possible ? how ? If you're using Outlook 2003, set up a search folder. If not, use = Advanced Find.=20 --=20 Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for=20 Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx =20 <Osiris>...

Logical Filtering based on Value
I've been using this formula to sort some values and return results if( or( and( b9<>"", isnumber( find( Left(b9,1 ,"AWFUY") ) ), isnumber( find("SHORT",g9 ) ), sum( countif(c9,{"BOG","BLM","CMO"}) ) ) ) ) ,i9-0.01,j9 ) --I used ALT-ENTER between each formula so as to see thing clearly Column A values can be "B01" Column B values can be "BRN" Columns I & J are values, one being lowest the other being highest allowed. On another sheet I...

User Account SPN for CRM ASP.NET Application Pool account ERROR.
Hi there, I got this error message before the installation of CRM 4.0: "Verify Domain User account SPN for the Microsoft Dynamics CRM ASP.NET Application Pool account". Here's my scenario: I joined the Server to the domain I logged in using the domain admin "Administrator" account Installed everything and followed every step. But I got this message. How can I solve this problem? Please advice. Thank you. This would indicate that the SPN is missing on the account that is/will run the CRM application pool. You can find this account in the IIS manager under the ...

Script in customer report not running on user's machine
Hello, I am using GP for the first time, and I just got into the report writer about 30 minutes ago, so I apologize in advance if this is a newbie question. We have a custom report. There is a script in the Window_AfterActivate event sets these options: Printer.Value = 0 Screen.Value = 1 File.Value = 1 FileName.Value = "c:\temp\test.txt" FileFormat.Value = 1 IfFileExisting.Value = 1 This works on my machine, but it does not work on the user's machine. Is there some sort of runtime I need to install on her machine to make this work? There could be...