G
Guest
Here is the code for my command button, i was trying to print the data on the
current record of the form i am in, but it went to print preview, all the
field is blank..no data showing, only show the field names..please help.
Private Sub cmdPrint_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 point
MsgBox "select a record to print"
Else
strwhere = [Mailing ListID] = "&me.[Mailing ListID]"
DoCmd.OpenReport "Mailing List", acViewPreview, , strwhere
End If
End Sub
current record of the form i am in, but it went to print preview, all the
field is blank..no data showing, only show the field names..please help.
Private Sub cmdPrint_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 point
MsgBox "select a record to print"
Else
strwhere = [Mailing ListID] = "&me.[Mailing ListID]"
DoCmd.OpenReport "Mailing List", acViewPreview, , strwhere
End If
End Sub