RE: Remove duplicate entry in combobox
by TWVudGFsRHJvdw » Wed, 12 Jul 2006 01:37:01 GMT
ell,
I thought I would be able to get this to work. Here is the situation I am
running into now.
When I open the unbound form, I get the single entries as opposed to the
duplicate entries I was getting. However, when I select one which activates
the OpenReport with Where command in the AfterUpdate actions, I get a type
mismatch error. The exact error message is
Run-time error '3464':
Data type mismatch in criteria expression
When I try to debug I hover over the where statement and the value assigned
is numerical based on the order of the selections in the combo box. I select
the first the value is 0, second is 1, etc. How do I code the OpenReport
command to utilize the Text/Number "value" that is actually in the combo box
that the user selects (i.e. "Dorm 12" when the user selects Dorm 12 from the
combo box)? I've tried using some of the other variations I see in the
discussion group but I'm not getting anywhere. The code I have in the
AfterUpdate of the Combo Box is
DoCmd.OpenReport "DestinationSingleRPT", acViewPreview, , "[Destination] = "
& Me!DestinationSearchCMB
I've tried using
DoCmd.OpenReport "DestinationSingleRPT", acViewPreview, , "[Destination] =
'" & Me!DestinationSearchCMB & "'" but I don't know what I'm doing wrong.
Help!
Thanks again.
"MentalDrow" wrote: