Preview a certain record on a report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I Have A button For Previewing a report for a work order. when it is clicked
it brings up the report however it starts at work order number. how can i
make it preview the current record, where work order number is the primary key

thanks in advance
 
Tmiller said:
I Have A button For Previewing a report for a work order. when it is clicked
it brings up the report however it starts at work order number. how can i
make it preview the current record, where work order number is the primary key


Modify the button's procedure so it looks more like:

Dim stDoc As String
Dim stWhere As String
stDoc = "name of report"
stWhere = "WoNum = " & Me.txtWoNum
DoCmd.OpenReport stDoc, acViewPreview, , stWhere
 
Back
Top