Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selecting Multiple criterea from a form using faq181-5497

Status
Not open for further replies.

Delindan

MIS
May 27, 2011
203
US
I am trying to use the buildwhere code supplied in faq181-5497
and am having trouble. I have 3 multi select list boxes which are all enabled and visible. Each has a Where= statement in the tag property. I cut and pasted the code at the bottom of my vb page and am referencing the code as follows:

Dim strWhere As String

Set DB = CurrentDb
strWhere = BuildWhere(Me)
Set qdf = DB.CreateQueryDef("", strWhere)
For Each prm In qdf.Parameters
prm.Value = Eval(prm.Name)
Next prm
Set RSBudget = qdf.OpenRecordset

It keeps bombing on the Set qdf line with a 3316 error invalid sql statement. Any ideas?
 
So if I'm the user and I've made my filter selection and haven't clicked the export button but have realized that I made an incorrect selection, it would be nice to be able to clear them. What I did was put a button next to each of the list boxes that executes the clearlist() for the corresponding listbox however it would be nice to be able to either hit escape to clear all selections or be able to click one button to clear all of the listbox selections. Can you do that...I haven't figured it out.
 
I guess that is a pretty obvious solution however I didn't think of it. I think what I'll do is a function that calls the clearlist function for all my list boxes. Thanks so much for the help. This looks awesome!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top