I AM SO DUMB..........................PLEASE HELP

J

John Vinson

Hi - It's me again. I guess I was just so happy to hear the printer go off - I didn't pay too much attention to what the form was printing. When I hit print form all that spits out is a blank work order form - none of the information I entered shows up. Simple Solution???

Print a Report with a correct recordsource.

Since you don't say what you did, and I don't really want to go
digging back through Google for previous posts (and since you probably
didn't post your code or your queries there anyway), I can't give a
more detailed answer, I fear! Could you give us a bit of help here?
 
J

John Vinson

Thanks for replying: the code I have entered is:

Private Sub Command48_Click()
Dim strCriteria As String
strCriteria = "[WorkOrder#]=" & Me![workorder#]
DoCmd.OpenReport "Work Order", acViewNormal, , strCriteria

Exit_Command48_Click:
Exit Sub

Err_Command48_Click:
MsgBox Err.Description
Resume Exit_Command48_Click

End Sub


I have a print form command button on the form in which I want to print each form (re-directed to a report with the same name Work Order #) after it has been completly entered.

You probably need to explicitly save the record currently being edited
to disk before launching the report. Try putting a line

If Me.Dirty = True Then Me.Dirty = False

immediately before the DoCmd.OpenReport line; this will write the
record currently on the form into the table, where it will be
available for the report.
 

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

Top