Parameter Form

pwicr

Registered User.
Local time
Today, 00:34
Joined
Sep 22, 2011
Messages
144
I used to have a button in my regular form that when I clicked it a report would generate for ONLY that CURRENT form. I set the parameters so that I would a number of pop up windows would come up and I would type in the information. (Used a query for the report record source and text boxes with parameters.)

NOW...

When I click the button on the form, it brings up another form that I just select things that will go in the report instead of typing them all in individually but I don't know how to get it to bring up the report for JUST the current form.

I would like to attach a screen shot but not sure which one would be best.

The code i HAD was....

Private Sub btnPWMSO_Click()

On Error GoTo Err_btnPWMSO_Click


Dim stLinkCriteria As String


If Me.Dirty Then Me.Dirty = False


stLinkCriteria = "[Serial Number] = " & Chr(34) & Me![Serial number] & Chr(34)

DoCmd.OpenReport "rptPWMSO", acViewPreview, , stLinkCriteria

Exit_btnPWMSO_Click:

Exit Sub

Err_btnPWMSO_Click:

MsgBox Err.Description
Resume Exit_btnPWMSO_Click
End Sub

The code I have NOW is....

Private Sub btnPWMSO_Click()
On Error GoTo Err_btnPWMSO_Click

Dim stLinkCriteria As String


If Me.Dirty Then Me.Dirty = False


stLinkCriteria = "[Serial Number] = " & Chr(34) & Me![Serial number] & Chr(34)

DoCmd.OpenForm "frmPWMSO", acNormal, , stLinkCriteria

Exit_btnPWMSO_Click:

Exit Sub

Err_btnPWMSO_Click:

MsgBox Err.Description
Resume Exit_btnPWMSO_Click
End Sub


Make sense? :D
 
If you have to enter information (parameters) into the form then put a command button on the form to run the report as you need to have the paramters entered before you can run the report.
 
If you have to enter information (parameters) into the form then put a command button on the form to run the report as you need to have the paramters entered before you can run the report.


I have a command button going to the parameter form to enter the parameters and then a command button to run the report from the parameter form. but i need just that one record and if I just run the report it will give me ALL the records.
 

Users who are viewing this thread

Back
Top Bottom