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

Updating combo box

P: n/a
Hi - I have a master/detail form with a combo box (AssetCode) on the
master form which uses a query as its Row Source. I can choose a
selection from the AssetCode combo box which fires an AfterUpdate event
to find the correct record and refresh the detail form.
However- if I use the forward or back buttons the combo box it still
lists the last lookup value. Is there a way that I can update the value
in the combo box without firing the AfterUpdate event to reflect the
AssetCode value in the current recordset?

Thanks

Patrick

Dec 16 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Hi Patrick

If I understand you right just add some code to the On Current event to
write the AssetCode to the combo box.

Jeff Pritchard
________________
Asken Research Pty. Ltd.
Access Database Developers
www.asken.com.au

"Patrick" <PD******@gmail.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
Hi - I have a master/detail form with a combo box (AssetCode) on the
master form which uses a query as its Row Source. I can choose a
selection from the AssetCode combo box which fires an AfterUpdate event
to find the correct record and refresh the detail form.
However- if I use the forward or back buttons the combo box it still
lists the last lookup value. Is there a way that I can update the value
in the combo box without firing the AfterUpdate event to reflect the
AssetCode value in the current recordset?

Thanks

Patrick

Dec 16 '05 #2

P: n/a
Jeff

As you probably can guess I'm a novice with Access.
Given that the Master form and the combo both run a query that
retrieves

ID
AssetCode
AssetName

from the Asset table

and the combo box binds to the ID (but displays the AssetCode)
Which method do I use in On Current to move the combo box to point to
the AssetCode in the underlying recordset?

Dec 16 '05 #3

P: n/a
"Patrick" <PD******@gmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
Jeff

As you probably can guess I'm a novice with Access.
Given that the Master form and the combo both run a query that
retrieves

ID
AssetCode
AssetName

from the Asset table

and the combo box binds to the ID (but displays the AssetCode)
Which method do I use in On Current to move the combo box to point to
the AssetCode in the underlying recordset?


Me!ComboBoxName = Me!ID

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Dec 16 '05 #4

P: n/a
Jeff & Rick

Thanks for the help. It works a treat.
I would have thought that I somehow needed to assign
Me!ID to a index that represented the position of the ID
in the combo box. Does it assign the value to the bound column
of the combo box?

Thanks again
Patrick

Dec 19 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.