Query problem... =(

nescartel

Registered User.
Local time
Tomorrow, 07:23
Joined
Feb 3, 2005
Messages
26
hi...

i have a table that contains data from 4 different states,
user will want to view it according to state,
so i made "[forms]![MyForm]![StateField]",
then i made a new form based on this query.

problem is, when the form is opened,
"enter parameter value" pops up,
and user has to enter value of 'state' into that box before the form is displayed. is there any way that user can just open the form without that popup? can it be possible for user to select state from a combobox on that form? how to update query once user selects this?

pliz help me. thanx in advance. :)
 
Double check the names of your form and text box and make sure they are exact to the reference in your query. The reason it is asking you for the parameter value is that it cannot find the textbox it is looking for.

A combo box to select the state is a great way to do it. All you have to do is create an Event Procedure in the After Update event of your combo box and enter one line of code: Me.Requery
 
nescartel,

You can set the DefaultValue for the combobox to one of your values, or
you can wait until the ComboBox has a value, then assign the RecordSource
for the form.

Wayne
 
errmm, sorry, but i have already given values to the combo box. and bcoz of the "me.requery" event set on 'after update', whenever i change the value of combo box, the query does rerun, but there is this "insert parameter value" popup msg. can't access just take the value in the combo box and automatically insert it in the "parameter value" field? am i doing this right? :confused:
 
nescartel,

The query should have this in its Criteria line for the field related to the
combo box:

Forms![YourForm]![YourCombo]

Wayne
 

Users who are viewing this thread

Back
Top Bottom