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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Criteria for report record selection from text box

Status
Not open for further replies.

meelzebub

Technical User
Sep 12, 2003
1
US
Hi, all -

I've created a DB in which my records are auto-numbered. (This number is also my primary key for the table.) I'm attempting to allow for viewing/printing of a single, specified issue within a report, but I'm having difficulty limiting the records being selected.

Essentially, I'm providing a "pop-up" free-form text box in which a user can enter an auto-number record number for viewing. I'm also, therefore, trying to figure out how to let the user know, if necessary, that the particular issue number they've entered does not correspond to a record in the DB. Any assistance is greatly appreciated!

mel
 
Hi

You could use a combo box based on a query on the table conating the autonumber, and limit list set to yes, would give error message if user entered an none existing number

to limit the report see the docmd.openreport eg

DoCmd.OpenReport stDocName, acPreview,,"Id = " & cboId

if you do not want to use a combo box, same doCmd techniche would work but using txtId in place of cboId, and you could use the reports NOData event to warn of none existing number

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top