Combo box usage

J

John

I have a combo box on a form that displays all the
different forms. When the form is selected from the
combo box, I would like that form to open. I am running
into difficulty getting this work.
Any assistance is appreciated.
*** John
 
J

John

Fred, never mind. I didn't move the bound property over
to column 3. It works now. Thanks again.
*** John
 
F

Fredg

John,
If the combo box has 3 columns, the value returned
will be whatever the bound column is.
In your case the ID column.

So instead of
DoCmd.OpenForm ComboBoxName
use:
DoCmd.OpenForm ComboBoxName.Column(2)

Column(2) is the THIRD column as Combo boxes are Zero based.
 
J

John

Fred, I was a bit hasty in saying it worked. I
originally had a macro to the buttons that would open up
each form. In the macro was a filter clause in the WHERE
line. I need to reproduce. I am relatively new to the
game and not sure how to get the cbo to use the filter
part for the forms that will be opened. A single button
approach with the cbo is acceptable. The filter line
used in the macro was [ClientCode}=Forms!
[usrfrmClientSelection]![ClientCode]. Each client has a
code associated and each form needs to be filtered to
each client using the client code. The form
usrfrmClientSelection is where the cbo is located for
opening the different forms. Need to get the filter in
there.
Thanks again.
*** John
 

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