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

Print Report Record From Form

Status
Not open for further replies.

Fortborg

Technical User
Jul 26, 2001
15
0
0
US
Hi All,

I am trying to get my form to print the associated report, with the current record only. My expression has been

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

DoCmd.OpenReport "Group Use Permits", acViewNormal, "[Id Number] = " & Forms!Recreation Permit!Id Number

This is producing a syntax error, I haven't been able to figure out why. I need to save the record and print the form with one command.

Any ideas? Thanks.

 
Hi

It would have helped if you said which LINE was causing the syntax error, it would have reduced the search area by 50%!,

but, try..

If Me.Dirty Then
DoCmd.RunCommand acCmdSaveRecord
End If

DoCmd.OpenReport "Group Use Permits", acViewNormal, "[Id Number] = " & Me.[Id 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