Parameter Form DropDown Issue

  • Thread starter knowshowrosegrows
  • Start date
K

knowshowrosegrows

Hello all

I need a Parameter Form that fronts a report of events.

The parameters in the report are
Reg
Vendor
Date Range Start
Date Range End

I want the Reg drop down to have the options 1, 2, 3, 4, 5 or ALL REGIONS

The qry that is behind the report is:
SELECT qryEventsInfo.Reg, qryEventsInfo.Agency, qryEventsInfo.Type,
qryEventsInfo.EventDate, qryEventsInfo.StartTime, qryEventsInfo.StaffName,
qryEventsInfo.EventDescription, qryEventsInfo.ReportSubmitted,
qryEventsInfo.Notes
FROM qryEventsInfo
WHERE
(((qryEventsInfo.Agency)=forms!frmSiteVisitByDateVendorParam!ChooseVendor))
Or (((qryEventsInfo.Reg)=forms!frmSiteVisitByDateVendorParam!ChooseRegion));

I want the user to have to choose EITHER a Reg Choice OR a Vendor Choice

I have some param form code for the EITHER Reg or Vendor Choice that I think
works:
Private Sub btnRunReport_Click()
Dim Region As String
Dim Agency As String
If Not IsNull(Agency) And Not IsNull(Region) Then
MsgBox "You must choose EITHER a Region option or a Provider option."
'Me![Region].SetFocus
Region = Empty And Agency = Empty
Else
Me.Visible = False
End If

End Sub


My Question:
How do I get the ALL REGIONS (which would basically mean ALL Records in the
time frame) to become a choice?

Is that enough info for you sports to help me?
 
J

Jeff Boyce

I suspect that when someone picks <ALL>, you want to eliminate the WHERE
clause!

But how do you want the interaction ("OR") between Reg and Vendor to play
out if <ALL> is chosen?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Param Form Code ??? 2
Parameters Question 2

Top