Mark32
02-26-2002, 04:50 AM
I am new to this. I have a combo box that is the values are from one table. I want to take the selection from the combo box and pull that specific record up into another form so the user can change values in the table. I got the combo box all set and I can get the next form open, but I can not have the selected record pull up in the new form. Any ideas
Thanks - Mark
Fizzio
02-26-2002, 05:40 AM
The easiest way I use is to base the second form on a query. In the query design, set the criteria of the field your combobox selects to =[Forms]![NameofFormwithCombo]![Nameofcombo] so that when you open the second form, it will only select the record that matches the combobox.
The downsides to this is that
a) the initial form must be open
b) you cannot show all the other records - only those that meet the query criteria.
HTH
Ps Other ways to do it are with the openargs method and code or using a filter generated by code
Mark32
02-26-2002, 05:49 AM
Thank you for your tip. I did this, but I am getting an "Enter Parameter Value" prompt? Did I set up the combo box wrong?
Fizzio
02-26-2002, 06:00 AM
What have you typed into your criteria box for that field. Make sure that you have replaced [Nameofformwithcombo] with the actual name of your table and [nameofcombo] with the actual name of the combo box (and that they are spelled correctly http://www.access-programmers.co.uk/ubb/smile.gif
Mark32
02-26-2002, 06:33 AM
Thanks again for the help. But I must be really slow, because I still must be doing something wrong. Here is what is in the criteria field (I used the build function)Forms![Active project look up]![Users Choice]. These are spelled the way the system sees them??? What I am I missing??
Fizzio
02-26-2002, 06:37 AM
Make sure it reads
=[Forms]![Active project look up]![Users Choice]
= sign is essential.
Mark32
02-26-2002, 06:42 AM
I have the = in the field, but I still get the prompt for "Enter Parameter Value"? Do I have to do anything special when I set up the combo box?
Thank you again for your help
Fizzio
02-26-2002, 07:40 AM
This means that the query does not recognise the criteria that you have set, it has no reflection on the combo box. It seems that you have set it up correctly though. Try renaming your form and combobox with no spaces in the names and try again but if no look, compile, compact, zip it then send it to me if you like so I can have a look.
BTW It may related to having spaces in your names but it is better practice to avoid having names in fieldnames, form names etc eg change Active project look up to frmActiveProjectLookUp and Users Choice to cboUsersChoice.