I have a pop up form where users select criterions to populate a report.
User first select their name and listbox will requery based on their name.
from that listbox, user can select items they like to see on their report.
it seems to work fine if user only selects one line but im getting "no data" when i select multiple lines.
here's the query im using
SELECT tbl_BudMaster.BudgetKey, tbl_BudMaster.BugetMonitor, tbl_BudMaster.BYR, tbl_BudMaster.ProjectBudNum, tbl_BudMaster.BudgetAmt, tbl_BudMaster.PrAmt, tbl_BudMaster.VoucherAmt, tbl_BudMaster.BalanceAmt
FROM tbl_BudMaster
WHERE (((tbl_BudMaster.BugetMonitor)=[forms]![rpt_budMaster]![cboBudmon]) AND ((tbl_BudMaster.ProjectBudNum)=[forms]![rpt_budmaster]![txtproj]));
and here's the back coding of the report
Private Sub Report_Close()
' Make sure the parameter form is closed
If IsFormLoaded("rpt_BudMaster") Then
DoCmd.Close acForm, "rpt_BudMaster"
End If
End Sub
Private Sub Report_NoData(Cancel As Integer)
' Cancel when no data
MsgBox "No records exist.", _
vbInformation, gstrAppTitle
Cancel = True
'DoCmd.OpenForm "frm_mainmenu"
End Sub
Private Sub Report_Open(Cancel As Integer)
' Open the parameter dialog
DoCmd.OpenForm "rpt_BudMaster", WindowMode:=acDialog, _
OpenArgs:="Budget Report"
' If the user closed the form (canceled)
If Not IsFormLoaded("rpt_BudMaster") Then
' Cancel this report
Cancel = True
End If
any help will be great. thx.
ps. i have looked at the post below about using listbox to filter reports but way i have it set up is lot different.
User first select their name and listbox will requery based on their name.
from that listbox, user can select items they like to see on their report.
it seems to work fine if user only selects one line but im getting "no data" when i select multiple lines.
here's the query im using
SELECT tbl_BudMaster.BudgetKey, tbl_BudMaster.BugetMonitor, tbl_BudMaster.BYR, tbl_BudMaster.ProjectBudNum, tbl_BudMaster.BudgetAmt, tbl_BudMaster.PrAmt, tbl_BudMaster.VoucherAmt, tbl_BudMaster.BalanceAmt
FROM tbl_BudMaster
WHERE (((tbl_BudMaster.BugetMonitor)=[forms]![rpt_budMaster]![cboBudmon]) AND ((tbl_BudMaster.ProjectBudNum)=[forms]![rpt_budmaster]![txtproj]));
and here's the back coding of the report
Private Sub Report_Close()
' Make sure the parameter form is closed
If IsFormLoaded("rpt_BudMaster") Then
DoCmd.Close acForm, "rpt_BudMaster"
End If
End Sub
Private Sub Report_NoData(Cancel As Integer)
' Cancel when no data
MsgBox "No records exist.", _
vbInformation, gstrAppTitle
Cancel = True
'DoCmd.OpenForm "frm_mainmenu"
End Sub
Private Sub Report_Open(Cancel As Integer)
' Open the parameter dialog
DoCmd.OpenForm "rpt_BudMaster", WindowMode:=acDialog, _
OpenArgs:="Budget Report"
' If the user closed the form (canceled)
If Not IsFormLoaded("rpt_BudMaster") Then
' Cancel this report
Cancel = True
End If
any help will be great. thx.
ps. i have looked at the post below about using listbox to filter reports but way i have it set up is lot different.