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
 
Back
Top