Results 1 to 2 of 2
2001-04-12, 01:10 #1lgrecoGuest
Using combo box as query parameter
Using Access 97
I'm trying to create a form which in essence, has a buttonand a combo box on it. When a selection is made from the combo box, the button is clicked and a record is displayed on a data entry form.
The combo box contains first and last names and the form contains all other fields describing a person; address phone ...
My problem is that even though I use forms!frmAdmin!cboPatients as the paramater in the query, my form doesn't display the selected record.
the onclick event has these lines in it.
doCmd.OpenForm "frmName", acNormal
forms!frmName.recordSource = qryNames
This is pretty basic, but I still can't get it to work.
2001-04-12, 01:18 #2
- Join Date
- Jan 2001
- Indianapolis, Indiana, USA
- Thanked 0 Times in 0 Posts
Re: Using combo box as query parameter
2 things to check:
1) Even though the combo box shows a certain value, it's possible that the actual value is coming from a different column in the RowSource, even a hidden column. Check into the RowSource property of the combo box.
2) This may or may not be a valid issue, but double check the line you used to set the RecordSource property of the form. It should probably read:<pre>Form_frmName.RecordSource = qryNames</pre>
HTH <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15><big><font color=blue>- M</big><font face="Comic Sans MS">ark</font face=comic><big>J -</big></font color=blue>
<IMG SRC=http://www.wopr.com/w3tuserpics/MarkJ_sig.gif border=0>