G
GS Ghali
I am trying to print just the one record that is being viewed in the form in
report format. The primary key is a text field - "File number".
I have tried to use this code but it doesnt seem to work
Private Sub cmdPrintSummary_Click()
Dim strWhere As String
If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If
If Me.NewRecord Then 'Check there is a record to print
MsgBox "Select a record to print"
Else
strWhere = "[File Number] = " & Me.[File Number]
DoCmd.OpenReport "Case Detail Summary", acViewPreview, , strWhere
End If
End Sub
Does anyone have any ideas? Thanks in advance.
report format. The primary key is a text field - "File number".
I have tried to use this code but it doesnt seem to work
Private Sub cmdPrintSummary_Click()
Dim strWhere As String
If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If
If Me.NewRecord Then 'Check there is a record to print
MsgBox "Select a record to print"
Else
strWhere = "[File Number] = " & Me.[File Number]
DoCmd.OpenReport "Case Detail Summary", acViewPreview, , strWhere
End If
End Sub
Does anyone have any ideas? Thanks in advance.