PDA

View Full Version : Solved: Print Button



Roaddog
09-11-2005, 01:38 PM
Hi all,

I'm new to Access so please be patient with me. :dunno I placed a command button called "Print Work Order" on a form which only prints the page for the current item showing on the form. I want this button to also reset for the next round of info instead of clicking on the astericks at the bottom left of the page. Is there a way to make the button reset through the print command button? If so how would I do it? Any help would be greatly appreciated. So far this is all the code I have for this command button.


Private Sub Command48_Click()
Dim stDocName As String
Dim stCriteria As String
Dim WO As String


stDocName = "PRINT"
Me![ID].SetFocus


stCriteria = "[ID]=" & "'" & Me![ID] & "'"
Me.Recalc



DoCmd.OpenReport stDocName, acNormal, , "ID=" & Me.ID

End Sub



Thanks in advance



Nevermind,

I figured it out. For anybody interested the code is below


Private Sub Command48_Click()
Dim stDocName As String
Dim stCriteria As String
Dim WO As String


stDocName = "PRINT"
Me![ID].SetFocus


stCriteria = "[ID]=" & "'" & Me![ID] & "'"
Me.Recalc



DoCmd.OpenReport stDocName, acNormal, , "ID=" & Me.ID
On Error GoTo Err_Command48_Click

DoCmd.GoToRecord , , acNewRec
Exit_Command48_Click:
Exit Sub
Err_Command48_Click:
MsgBox Err.Description
Resume Exit_Command48_Click
End Sub


Larry : pray2: