Capturing Parameter Values

J

Josef

i have a query that requires a user to enter their ID eg. [Enter Staff
ID]. this query is linked to a form that displays their employee
information. at times when they mistype their ID, the form cannot
display their data.

is there any way of capturing the parameter value before the form loads
so i can stop the form from loading and allowing me to display an error
message?

thanks.
 
P

PC Datasheet

See if you can find QueryDef.Parameters in the Help file. You may need to lokk
for just parameters.
 
G

Graham Mandeno

Hi Josef

Instead of using a parameter query, I suggest you make a small form with a
combo box on it. In the combo you can list all the valid Staff IDs. Then,
on the click of an "OK" button, load the employee info form, filtered to the
appropriate record:

DoCmd.OpenForm "frmEmployeeInfo", , , "[StaffID]=" & cboSelectID

Personally, I would never expose a user to a parameter query prompt - they
are just too limited in their capability.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top