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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use a multi-select box in a parameter form.

Status
Not open for further replies.

mrfritz44

MIS
Nov 21, 2003
75
US
I'm using a form to pass variables to a query. On this form is a multi-select box. If I set it for no multiple selection, the object works fine and I can see my chosen value in the Datasheet view. However, when I use simple or extended selection, the form does not pass the values and the object value comes up NULL.

How would I allow this multi-select funcitonality to work?

Lastly, in the query, would this be the correct syntax for specifying the parameter once it gets passed:

In ([Forms]![frm_ReportMenu]![Analyst])

Thanks for your help,

Fred
 
To grap the info from one multiselect box:

If Me!YrList.MultiSelect > 0 Then
With Me!YrList
For Each I In .ItemsSelected
CName = .Column(1, I)
Set Re = CurrentDb.OpenRecordset("Select * From YrTable Where YrID=" & .Column(0, I) & " AND SetNr=" & SamID)
If Re.RecordCount = 0 Then SomeCode....
Next I
End With
Me!YrList.Requery
Me!YrList.SetFocus
End If

In your case I would build my recordsouce in the above shown way, you would have to handle the "where's" as you roll thru the "I's"

Herman
Say no to macros
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top