Parameter Query - "a value you want to insert in a field"

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello. I need to prompt users to enter data into the address field of a form
before moving on to the rest of the form. I believe that a parameter query,
with its associated dialogue box, is the cleanest method to create the prompt.

While the MS Access 2003 help profile indicates that you can create a
parameter query to prompt a user to enter "a value you want to insert in a
field", I cannot locate instructions for creating one. Hopefully, I am
overlooking something astonishingly simple.

Help would be greatly appreciated.

Thanks!
 
If your user is using a form, why would you force them to respond to a
prompt in a query? How is the query related to the form?

If you want them to enter a value in a control (the address) before entering
values in any other controls, you can set those other controls.Enabled
property to False until there's a value entered in the Address control.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
I usually just insert the question in the criteria box surrounded like brackets

Like

[You have to input abc to move on]

When you run the query a box pops up requesting the parameter with "You have
to input abc to move on".

FYI,
If I am doing dates I will specify format in the paramter as follows
[please input start date like xx/xx/xx]

Hope that helps!
 
I need a bit of clarification. From what I know, entering criteria in
brackets as you've described allows the user to set the parameters for the
query, thereby return the data set according to the information they entered.


I want the data they enter to be used to fill the "address" field, not to
set the search parameters.

Am I missing something?

Thanks!

jjacob said:
I usually just insert the question in the criteria box surrounded like brackets

Like

[You have to input abc to move on]

When you run the query a box pops up requesting the parameter with "You have
to input abc to move on".

FYI,
If I am doing dates I will specify format in the paramter as follows
[please input start date like xx/xx/xx]

Hope that helps!

picklestfc said:
Hello. I need to prompt users to enter data into the address field of a form
before moving on to the rest of the form. I believe that a parameter query,
with its associated dialogue box, is the cleanest method to create the prompt.

While the MS Access 2003 help profile indicates that you can create a
parameter query to prompt a user to enter "a value you want to insert in a
field", I cannot locate instructions for creating one. Hopefully, I am
overlooking something astonishingly simple.

Help would be greatly appreciated.

Thanks!
 
Thanks Jeff.

I do like your solution. Unfortunately, I am not savvy enough to fully
implement it. If you have time, I could use further clarification.

I know how to disable the fields (subform, actually) I want to lock, but I
do not know how to program the switch that will enable them after the address
has been entered.

Can you help with that?

Thanks!
 
One approach would be to add an Event Procedure to the Address control's
AfterUpdate event. It would look something like (your syntax may vary):

If Nz(Me!txtAddress,"") <> "" Then
Me!txtCity.Enabled = True
Me!txtStateProv.Enabled = True
...
Else
Me!txtCity = Null
Me!txtCity.Enabled = False

Me!txtStateProv = Null
Me!txtStateProv.Enabled = False
...

End If

Use your form's names for the controls. You can use Access HELP for help
with the syntax.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
That's the ticket! Thanks, Jeff!

M

Jeff Boyce said:
One approach would be to add an Event Procedure to the Address control's
AfterUpdate event. It would look something like (your syntax may vary):

If Nz(Me!txtAddress,"") <> "" Then
Me!txtCity.Enabled = True
Me!txtStateProv.Enabled = True
...
Else
Me!txtCity = Null
Me!txtCity.Enabled = False

Me!txtStateProv = Null
Me!txtStateProv.Enabled = False
...

End If

Use your form's names for the controls. You can use Access HELP for help
with the syntax.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Back
Top