Well first of all this block form does not need to rely on date ranges it depends on block only. The control names or different blocks will be A1,A2,A3,A4,A5,A6, B1-B6, etc on through to the letter P. So there will be quite a few to choose from. So instead of dates to be entered I would like the user to choose from a list of all the blocks. So when a user chooses A1 a report generates all the blocks corresponding to block A1. Here is the code I have now, but it is just what you listed earlier with the date code taken out.
Private Sub Command0_Click()
Dim strReport As String 'Name of report to open.
Dim strField As String 'Name of your date field.
Dim strWhere As String 'Where condition for OpenReport.
strReport = "Block Summary Report"
strField = "BLOCK"
' Debug.Print strWhere 'For debugging purposes only.
DoCmd.OpenReport strReport, acViewPreview, , strWhere
Me.Visible = False
If Not IsNull(Me.cboBlock) Then 'block combo box
strWhere = " AND [BLOCK] = """ & Me.cboBlock & """"
End If
End Sub
I hope this helps .. thank you again for you help.