Capturing Parameter Values

  • Thread starter Thread starter Josef
  • Start date Start date
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.
 
See if you can find QueryDef.Parameters in the Help file. You may need to lokk
for just parameters.
 
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.
 
Back
Top