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!

Did it print correct?

Status
Not open for further replies.

EllieFant

MIS
May 15, 2001
513
0
0
US
Hi all - long time no see.

I have an accountability database for printing our accountability badges. What I need to do is this...

Have a field that when checked means that the cards have already been printed. When I enter a new set of cards (new employees) I will print a report that will print the cards out (they are printed with a report that is a label report). What I want to happen is have a dialog box pop up that says "Did the card print correctly?" If the answer is no, then the report closes and nothing. If the answer is yes, then the report closes and an update query runs putting a check in the printed field.

Can someone point me in the right direction of how to do this? I want to be able to click a button on a form to print the report.

Thanks so much in advance for the awesome help I know I will be getting.

Lena Ellie
**Using Access 97**

lena.wood@wgint.com (work)
elliefant@starband.net (home)
 
Hmm... ok so you're probably running the report from a form... as the onclick event of pushing a button on that form?


Private Sub YourButtonName_OnClick()
Dim Response

Response = MsgBox("Did it print ok?", vbYesNo)
If Response = vbNo Then
' Do nothing
Else
' Run the update query
Docmd.blahblah
End If
End Sub
 
Actually the report will open from a button on a form. When the form is printed is when I want this to all take place.

I hope that I can make this work...if not, they will just have to run the update query after they have printed the cards.

Ellie
**Using Access 97**

lena.wood@wgint.com (work)
elliefant@starband.net (home)
 
I think you can make it work just fine like this:

Private Sub YourButtonName_OnClick()
Dim Response

' Run your report
Docmd.blahblah

Response = MsgBox("Please print the report. Would you like to mark the records as processed?", vbYesNo)
If Response = vbNo Then
' Do nothing
Else
' Run the update query
Docmd.blahblah
End If
End Sub





 
Thanks for your help...I am new enough to this that I am not sure what goes after the Docmd. I know enough to know it isn't blahblah though :)

Thanks for your help...I will make it work. Ellie
**Using Access 97**

lena.wood@wgint.com (work)
elliefant@starband.net (home)
 
Welcome... the help explains docmd pretty well...

You'll probably notice you get some prompts like "Are you sure you want to update this table" when you run the update query via docmd... if you want to suppredd them, you can use another docmd method:


and make sure to turn 'em back on after the query runs...
DoCmd.Setwarnings False
DoCmd.OpenQuery blahblah
DoCmd.Setwarnings True

Good luck, hope that helps a bit.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top