-----Original Message-----
That worked great for fullname, however, for a second
criteria (bankdate) I can't seem to figure it out. I
don't know enought about programming ... where would you
start the "DIM" part of the procedure or is that even what
you would start with.
Here's what I have so far...
Private Sub Command56_Click()
On Error GoTo Err_Command56_Click
Dim stName As String
Dim stDocName As String
Dim stFilter As String
stName = [FullName]
stDocName = "RPTTickets1"
stFilter = "[FullName] = " & "'" & stName & "'"
DoCmd.OpenReport stDocName, acPreview, , stFilter
Exit_Command56_Click:
Exit Sub
Err_Command56_Click:
MsgBox Err.Description
Resume Exit_Command56_Click
-----Original Message-----
Here's what I use; however, it doesn't include current
date field as part of the criteria but you could include
it...
===============
Private Sub cmdPrintCurrentRecord_Click()
On Error GoTo Err_cmdPrintCurrentRecord_Click
Dim stName As String
Dim stDocName As String
Dim stFilter As String
stName = [Field_Name]
stDocName = "rpt_Name_of_Report"
stFilter = "[Field_Name] = " & "'" & stName & "'"
DoCmd.OpenReport stDocName, acNormal, , stFilter
Exit_cmdPrintCurrentRecord_Click:
Exit Sub
Err_cmdPrintCurrentRecord_Click:
MsgBox Err.Description
Resume Exit_cmdPrintCurrentRecord_Click
End Sub
===============
Hopefully helpful,
Jim
-----Original Message-----
I have a form with a print button. The report has
parameters where it asks for the name of the employee and
date to run the report. Is there anyway to set the print
button to automatically know the parameters for this
report are the current name and current date.
.
.
.