Donkeygirl
Technical User
lol
Ok I have a form for viewing lists. The user chooses 1 of 2 options from the first option group on the form. It allows them to decide if they want to see a list including data from areas, or for a specific area. If they choose 2 then they also choose an area from a drop down combo box. Then they go to the second option group. This is where they decide what type of list they want. Now every report that shows a type of list for all areas works, but the reports for specific areas don't. None of them open or respond on click. Every report is attached to their own query which asks for the form's area field in the criteria.
can you help me fix this?
My entire upgrade of this db is fixed once this is.
This is the code...
Private Sub cmdSldview_Click()
Dim intWarning As Integer
Dim strReport As String
Dim intTask As Integer: intTask = Me![Task Where?]
Dim intStodone As Integer: intStodone = Me![Stodone]
If intStodone = 1 And IsNull(Me![Sdate1]) Then
intWarning = MsgBox("You must enter the date required", vbCritical, "Incomplete Data"
Exit Sub
End If
If intStodone = 2 And (IsNull(Me![Sdate1]) Or IsNull(Me![Sdate2])) Then
intWarning = MsgBox("You must enter both dates required", vbCritical, "Incomplete Data"
Exit Sub
End If
If intTask = 1 Then
If intStodone = 1 Then strReport = "R-Schedule - By Date"
If intStodone = 2 Then strReport = "R-Schedule - By Date Interval"
If intStodone = 3 Then strReport = "R-Schedule - To Do"
If intStodone = 4 Then strReport = "R-Schedule - Done"
If intStodone = 5 Then strReport = "R-Schedule - All"
ElseIf intTask = 2 Then
If intStodone = 1 Then strReport = "R-Schedule By LD - By Date"
If intStodone = 2 Then strReport = "R-Schedule By LD - By Date Interval"
If intStodone = 3 Then strReport = "R-Schedule By LD - To Do"
If intStodone = 4 Then strReport = "R-Schedule By LD - Done"
If intStodone = 5 Then strReport = "R-Schedule By LD - All"
Exit Sub
End If
DoCmd.OpenReport strReport, acViewPreview
End Sub
why do the first half of the reports work, but not the second?
grrrrr. lol
please excuse any wrapping that may be present in the text of the code.
Thank you all.
Donkeygirl,
Kickin' the crap out of Access
Ok I have a form for viewing lists. The user chooses 1 of 2 options from the first option group on the form. It allows them to decide if they want to see a list including data from areas, or for a specific area. If they choose 2 then they also choose an area from a drop down combo box. Then they go to the second option group. This is where they decide what type of list they want. Now every report that shows a type of list for all areas works, but the reports for specific areas don't. None of them open or respond on click. Every report is attached to their own query which asks for the form's area field in the criteria.
can you help me fix this?
My entire upgrade of this db is fixed once this is.
This is the code...
Private Sub cmdSldview_Click()
Dim intWarning As Integer
Dim strReport As String
Dim intTask As Integer: intTask = Me![Task Where?]
Dim intStodone As Integer: intStodone = Me![Stodone]
If intStodone = 1 And IsNull(Me![Sdate1]) Then
intWarning = MsgBox("You must enter the date required", vbCritical, "Incomplete Data"
Exit Sub
End If
If intStodone = 2 And (IsNull(Me![Sdate1]) Or IsNull(Me![Sdate2])) Then
intWarning = MsgBox("You must enter both dates required", vbCritical, "Incomplete Data"
Exit Sub
End If
If intTask = 1 Then
If intStodone = 1 Then strReport = "R-Schedule - By Date"
If intStodone = 2 Then strReport = "R-Schedule - By Date Interval"
If intStodone = 3 Then strReport = "R-Schedule - To Do"
If intStodone = 4 Then strReport = "R-Schedule - Done"
If intStodone = 5 Then strReport = "R-Schedule - All"
ElseIf intTask = 2 Then
If intStodone = 1 Then strReport = "R-Schedule By LD - By Date"
If intStodone = 2 Then strReport = "R-Schedule By LD - By Date Interval"
If intStodone = 3 Then strReport = "R-Schedule By LD - To Do"
If intStodone = 4 Then strReport = "R-Schedule By LD - Done"
If intStodone = 5 Then strReport = "R-Schedule By LD - All"
Exit Sub
End If
DoCmd.OpenReport strReport, acViewPreview
End Sub
why do the first half of the reports work, but not the second?
grrrrr. lol
please excuse any wrapping that may be present in the text of the code.
Thank you all.
Donkeygirl,
Kickin' the crap out of Access