Parameters from form

lipin

Registered User.
Local time
Today, 21:37
Joined
May 21, 2002
Messages
149
OK I have a form where the user enters their ID num and password. On this form is a control button that opens a report. The reports source is a query and I had it set to ask the User ID and the Date in the criteria. Well I am trying to make it where the criteria for the user name is not asked for anymore but comes from the textbox where they enter their ID.

This textbox is actually a combobox.

So I changed the Criteria of the User ID field in the query to:
Forms!frmAuditor!txtAuditor

So that it would only return records for the ID number in the textbox on the form.

There is a box on the report to show the user number and this shows perfectly, but I don't get ANY records for the User!!

I thought that putting Forms!frmAuditor!txtAuditor in the query criteria would do the trick, it obviously is getting the User # because it shows on the report, but its like its not using that also for criteria on the query. How can I get it to do this????
 
Last edited:
Add an unbound textbox to your form and call it txtAudHid. You can hide it anywhere on the form.

Add the following to the OnClick Event of the Auditor Combobox

Me.txtAudHid = me.comboboxname.text

Then change the Query to be
[Forms]![frmAuditor]![txtAudHid]

Hope this works
 
Works like a charm. Thanks a lot!!!!!
 

Users who are viewing this thread

Back
Top Bottom