468,765 Members | 1,196 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,765 developers. It's quick & easy.

using the combo box with a button

hi,

can someone give me an idea how to do this:

i have a combo box and a command button, "Go", next to it.
the combo box is displaying the "Person Name" from a table with "ID"
and "Person Name". When I click "Go" i want to open a form associated
with the current display on the combo box. Thank you in advace.
Nov 12 '05 #1
3 2154
If the ID is the first column of the combo box and is hidden to display only
the person's name place the following code into the On Click event of the
"Go" command button.

DoCmd.OpenForm "YourFormName", , , Me!YourCommandButtonName.Column(0)

Just change the obvious

Stewart
"Paul" <pc*******@yahoo.com> wrote in message
news:78**************************@posting.google.c om...
hi,

can someone give me an idea how to do this:

i have a combo box and a command button, "Go", next to it.
the combo box is displaying the "Person Name" from a table with "ID"
and "Person Name". When I click "Go" i want to open a form associated
with the current display on the combo box. Thank you in advace.

Nov 12 '05 #2
Er, Stewart, shouldn't that read as follows?

DoCmd.OpenForm "YourFormName", , , "[YourNameFieldName] = """ &
Me!YourComboBoxName.Column(0) & """"

"Stewart Allen" <sa****@REMOVETHISwave.co.nz> wrote in message
news:bn**********@news.wave.co.nz...
If the ID is the first column of the combo box and is hidden to display only the person's name place the following code into the On Click event of the
"Go" command button.

DoCmd.OpenForm "YourFormName", , , Me!YourCommandButtonName.Column(0)

Just change the obvious

Stewart
"Paul" <pc*******@yahoo.com> wrote in message
news:78**************************@posting.google.c om...
hi,

can someone give me an idea how to do this:

i have a combo box and a command button, "Go", next to it.
the combo box is displaying the "Person Name" from a table with "ID"
and "Person Name". When I click "Go" i want to open a form associated
with the current display on the combo box. Thank you in advace.


Nov 12 '05 #3
You're right Larry

"Larry Linson" <bo*****@localhost.not> wrote in message
news:BL****************@nwrddc03.gnilink.net...
Er, Stewart, shouldn't that read as follows?

DoCmd.OpenForm "YourFormName", , , "[YourNameFieldName] = """ &
Me!YourComboBoxName.Column(0) & """"

"Stewart Allen" <sa****@REMOVETHISwave.co.nz> wrote in message
news:bn**********@news.wave.co.nz...
If the ID is the first column of the combo box and is hidden to display

only
the person's name place the following code into the On Click event of the "Go" command button.

DoCmd.OpenForm "YourFormName", , , Me!YourCommandButtonName.Column(0)

Just change the obvious

Stewart
"Paul" <pc*******@yahoo.com> wrote in message
news:78**************************@posting.google.c om...
hi,

can someone give me an idea how to do this:

i have a combo box and a command button, "Go", next to it.
the combo box is displaying the "Person Name" from a table with "ID"
and "Person Name". When I click "Go" i want to open a form associated
with the current display on the combo box. Thank you in advace.



Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by meganrobertson22 | last post: by
2 posts views Thread by kiranmn75 | last post: by
4 posts views Thread by Dave | last post: by
1 post views Thread by CARIGAR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.