By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,510 Members | 1,451 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,510 IT Pros & Developers. It's quick & easy.

using the combo box with a button

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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.