record select for report question

  • Thread starter Thread starter Kevin
  • Start date Start date
K

Kevin

I'm looking for a record in the datasheet and want to print a report for
that record - what is the simplest way to go about that?
 
The simplest way is to use a Form, not a datasheet, and put a CommandButton
on the Form... use the unique ID of the currently selected record to create
the WHERE clause without the WHERE that is needed for the WhereCondition
argument of DoCmd.OpenReport... something like

Dim strWhere as String
strWhere = "[SerialNumber] = " & Me!txtSerialNumber
DoCmd.OpenReport "rptSomeRep",,,strWhere

Larry Linson
Microsoft Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top