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

Selecting record to print from subform

Status
Not open for further replies.

spencern

Programmer
Dec 20, 2001
78
0
0
US
Hello, I'm working on a pharmacy db and can't figure out how to print a report based on which record is selected in a subform. Basically I have a subform that shows refills. I want to be able to right click a row in the subform, select print and have it print out a sheet of 10 labels. I think I can handle the printing using a query but I'm not sure how I would do the right click menu and have it pass a unique ID to the query for printing. This was done in an old paradox db, but I'm not sure how it could be done in Access.

Does anyone have any experience with something like this?

Thanks for your help,
Spencer
 
open your main form in design mode.
then, in your query, you can right-click in the CRITERIA row underneath your ID field (or whatever you're looking for). choose BUILD and it will step you thru to build the code to find the ID in the subform that you want. it will end up writing something like this:

Forms![Main]![subFormName].Form![IDField]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top