Problem with filtering a combo box...

G

Guest

Hi there,

I am creating a form where I have three combo boxes, each with a toggle box
in order to filter data. For example if I wish to filter only the Germany
entries, I select "Germany" from the relevant combo box and then click the
toggle. So far this is okay, but I am having trouble with the last entry,
dispatch method, as the data is stored as a number and I'd like to have the
information displayed as text.

I have finally worked out that the data is stored as a number, and this is
where the problem occurs. I have the entries okay in the combo box, where it
will display the 2nd column - Dispatch Method Names - but as the data is
stored as a number in the underlying table, the two don't match up.

Please help, and if it helps, the code is as follows:

Private Sub tglByDispatchMethod_Click()
If Me.tglByDispatchMethod = True Then
Me.Filter = "DispatchMethod =" & Me.cboByDispatchMethod & ""
Me.FilterOn = True
Else
Me.FilterOn = False
Me.cboByZone = ""
End If
End Sub

PS: When I un-toggle the toogle button, I'd like the combo box on the form
to be cleared out; how do I do that?





Can anyone help me out here?
 
J

Jeff Boyce

I'm not clear on what is happening...

From your description, you are using a form, with a combo box (several,
actually), and your table is storing the rowID of a list item selected, even
though the combo box is display the (say) second column. The combo box is
STORING the rowID, even though it displays the second column. There should
be no discrepancy. Where are you finding a discrepancy?

--
Regards

Jeff Boyce
www.InformationFutures.net

Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/
 
G

Guest

Hi Jeff,

Sorry, it was hard trying to explain it!

The problem I am experiencing is I get a message box popping up saying
'Enter Parameter value'.

What's happended?

Apologies, as I'm quite new to VBA...
 

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

Top