Hi all you guys have been a great help in the past. The DB admin at work is swamped right now however here it goes.
I have a form that all it does is allow the user to search the database for a processing date and generates a report for that processing day.
It is setup so that there are 2 fields. a start and end for processing.
Private Sub Report_Click()
If (Me.End_CDC) = "" Then
DoCmd.OpenReport "Game_Report", acViewPreview, , "CDC_Date = " & CInt(Me.Start_CDC)
Else
DoCmd.OpenReport "Game_Report", acViewPreview, , ("CDC_Date BETWEEN ") & (CInt([Start_CDC])) & “ And “ & (CInt([End_CDC]))
End If
End Sub
this is the code i have on the button.
however if i stick 1 number in the start field i get an invalid use of null error.
if i stick 2 numbers in it i get a type mismatch. i have it set to convert it to integer since that is what is on the main form.
DoCmd.OpenReport "Game_Report", acViewPreview, , "CDC_Date = " & Me.CDC_Date
this is the code i have on another button on the main page and it works just fine. however it only pulls up 1 report and the current one you can't search or get a range of reports.
I have a form that all it does is allow the user to search the database for a processing date and generates a report for that processing day.
It is setup so that there are 2 fields. a start and end for processing.
Private Sub Report_Click()
If (Me.End_CDC) = "" Then
DoCmd.OpenReport "Game_Report", acViewPreview, , "CDC_Date = " & CInt(Me.Start_CDC)
Else
DoCmd.OpenReport "Game_Report", acViewPreview, , ("CDC_Date BETWEEN ") & (CInt([Start_CDC])) & “ And “ & (CInt([End_CDC]))
End If
End Sub
this is the code i have on the button.
however if i stick 1 number in the start field i get an invalid use of null error.
if i stick 2 numbers in it i get a type mismatch. i have it set to convert it to integer since that is what is on the main form.
DoCmd.OpenReport "Game_Report", acViewPreview, , "CDC_Date = " & Me.CDC_Date
this is the code i have on another button on the main page and it works just fine. however it only pulls up 1 report and the current one you can't search or get a range of reports.