Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linking query to form to report

Status
Not open for further replies.

hwmueller

Technical User
Jan 16, 2001
155
Hi

I have a mysterious problem with my database!

Basically what I have is a set of records which identify themselves by means of a 7 digit number. I want a user to be able to enter their number into a text box and then click on a print preview button which then calls up their record.

To facilitate this I have a form called PrintRec and the textbox is called Num. I also have a query called Print Query. In it I have all the fields I want to appear on the report and in the criteria section of the ID field I have [Forms]![ PrintRec]![ Num]. A report with the query as source has also been created. The problem arises when I select the form and enter the ID number. Once I click on the Print preview button a message box appears called ‘Enter Parameter Value’ and underneath that [Forms]![ PrintRec]![ Num]. Only once I enter the ID here does the correct preview appear. It makes no difference if I leave the text box (Num) empty or not. In fact I can type what ever I want in the text box and it makes no difference.

So what I would like to know is either how I can prevent the ‘Enter Parameter Value’ box from appearing after clicking print preview, or how I can rename this box to show instead of ‘Enter Parameter Value’, something such as ‘Enter your ID number’.

Thanks

Hans
 
What is the event behind your Print preview button? Check that it only opens the report. Who takes 7 seconds to develop,
7 mins to document,
7 hours to test,
7 months to fix will always blame the clock. s-)
 
I have checked that and all that it says is [Event Procedure]. The code only opens the report.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top