Hi all,
I have a form in which there is a command button which will open a report that summarizes what has been entered on the form, sort of a "Face Sheet", I call it a "Pseudo Tracker". When I click on the "Print Tracker" button I am prompted to enter the "CMM ID#" (which is one of the fields obviously). Is there a way that I can open this report with using the current record (CMM ID #) that is open in the form? Below I am going to paste the generic code that my command button uses to open the report. Please Help if you can!!
I'm using Access 97 and am not good at code so if you can help me out with some advice or maybe even pasting my code and correcting it so I can past it back in would be awesome but please tell me what I have left out... Trying hard to learn VB!
Thanks!!
Andy
Code is below this line:
Private Sub Command53_Click()
On Error GoTo Err_Command53_Click
Dim stDocName As String
stDocName = "Pseudo Tracker"
DoCmd.OpenReport stDocName, acPreview
Exit_Command53_Click:
Exit Sub
Err_Command53_Click:
MsgBox Err.Description
Resume Exit_Command53_Click
End Sub
I have a form in which there is a command button which will open a report that summarizes what has been entered on the form, sort of a "Face Sheet", I call it a "Pseudo Tracker". When I click on the "Print Tracker" button I am prompted to enter the "CMM ID#" (which is one of the fields obviously). Is there a way that I can open this report with using the current record (CMM ID #) that is open in the form? Below I am going to paste the generic code that my command button uses to open the report. Please Help if you can!!
I'm using Access 97 and am not good at code so if you can help me out with some advice or maybe even pasting my code and correcting it so I can past it back in would be awesome but please tell me what I have left out... Trying hard to learn VB!
Thanks!!
Andy
Code is below this line:
Private Sub Command53_Click()
On Error GoTo Err_Command53_Click
Dim stDocName As String
stDocName = "Pseudo Tracker"
DoCmd.OpenReport stDocName, acPreview
Exit_Command53_Click:
Exit Sub
Err_Command53_Click:
MsgBox Err.Description
Resume Exit_Command53_Click
End Sub