I am very new at this. So I'm sure I am far from right, so could some one help. I am trying to create a report that will ask weather you want a female or male report of customers through a input box. What I have is bellow:
Code:
Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As Integer)
Dim strF As String
Dim strM As String
Dim strGender As String
Dim intButtonPressed As Integer
strGender = InputBox("Enter F for female repot and M for Male report.", 4, "Gender Report")
If strGender = F Then
DoCmd.ApplyFilter "SELECT * FROM tblCustomer WHERE Gender = 'F'"
ElseIf strGender = M Then
DoCmd.ApplyFilter "SELECT * FROM tblCustomer WHERE Gender = 'M'"
End If
End Sub