S
Slez via AccessMonster.com
I am getting the message "Type mismatch" when I try to run a report based on
what records are selected in a multi-select list box. I believe that the
problem may be stemming from my criteria statement as shown here:
For Each varItem In Me!lstBidSelect.ItemsSelected
strCriteria = strCriteria & ", " & Me.lstBidSelect.ItemData(varItem)
Next varItem
I copied this statement from a different location and adapted it, but my list
boxes are different. The original only had 1 column: BidNumber
The new list box, lstBidSelect, has 3 columns: BidNumber, BidType, BidStatus
Here is the Row Source of my multi-select list box if that helps:
SELECT Bid.BidNumber, Bid.BidType, Bid.BidStatus FROM qryBid WHERE (((Bid.
ProjectID)=Forms!frmMainScreen!cboProjectName)) ORDER BY BidNumber;
Do I need to reference which column the data is collected from for
strCriteria?...or is this error message a result of something else? If so,
what should I look for?
I believe that the issue is with my form's code because I can enter the
criteria directly in the query and the report runs perfectly.
Help is appreciated!
what records are selected in a multi-select list box. I believe that the
problem may be stemming from my criteria statement as shown here:
For Each varItem In Me!lstBidSelect.ItemsSelected
strCriteria = strCriteria & ", " & Me.lstBidSelect.ItemData(varItem)
Next varItem
I copied this statement from a different location and adapted it, but my list
boxes are different. The original only had 1 column: BidNumber
The new list box, lstBidSelect, has 3 columns: BidNumber, BidType, BidStatus
Here is the Row Source of my multi-select list box if that helps:
SELECT Bid.BidNumber, Bid.BidType, Bid.BidStatus FROM qryBid WHERE (((Bid.
ProjectID)=Forms!frmMainScreen!cboProjectName)) ORDER BY BidNumber;
Do I need to reference which column the data is collected from for
strCriteria?...or is this error message a result of something else? If so,
what should I look for?
I believe that the issue is with my form's code because I can enter the
criteria directly in the query and the report runs perfectly.
Help is appreciated!