Combo box wizard not working

UniqueTII

What?
Local time
Today, 12:31
Joined
Apr 4, 2002
Messages
95
I have a form that's based on a parameter query, and I'd like to have a combo box on it that's based on one of the fields and filters the form after it's updated, but when I try to create one using the wizard, I choose the field and it tells me that a value for a required parameter is missing. If I try to manually link the combo box to the query, it doesn't work properly because it's a parameter query, and I don't want it to ask for the parameters when the form is opened AND when the combo box is updated. Anyone have any ideas why it doesn't work or anything I can do to fix it?
 
I think the piece your missing is that the query can with in the control be saved as a SQL statement which will allow you to use it a little different than the original version.

On the Row source property of the control click on th elispe instead of the pull down. Pick the queery you want to use make any changes needed to minimize the data being brought back and modify your criteria to look at the form instead of the parameter to get informaion if needed.

THEN do not click SAVE instead click on the close X access will ask you if you want to save changes in the SQL atatement and update the property. Thsi is exactlly what you want say yes. What Access has just done is using your original query as a templete it allowed you to make modifications to fit your ciurrent needs and will use that modified version to control the combo box.

Hope this helps, hope this was the problem
 
What I did is pretty close to that. Since the form will have different values for "Code" and "YearID", I made an onLoad event that looks like this:
Code:
cbxSearchByID.RowSource = "SELECT tblApplication.AppStudentID FROM tblApplication WHERE tblApplication.code = """ & Code & """ AND tblApplication.yearID = """ & YearID & """;"
Me.Refresh
 

Users who are viewing this thread

Back
Top Bottom