From: RMorton on
New to Access. I want to create a form that coworkers can use to lookup
information in a database for inputting data into a PO as well as submit new
records into the database. I want to have a control that is a combo drop down
box where the can select a row from a list of items in a specified field and
based on that selection it will update the below text box control with the
corresponding data in the field next to it on the database. Make sense?
Basically need to figure out how to update one control based on data selected
from the drop down box control above it???
From: Linq Adams via AccessMonster.com on
Private Sub YourComboBox_AfterUpdate()
Me.TextBoxName = Me.YourComboBox.Column(X)
End Sub

where the X is an integer designating the column of the combobox you want to
populate the Textbox. This is Zero-based, so reading the combobox Left-to-
Right, if you have, say, fields

PO_Num, Company, ContactName

and you wanted the textbox to be populated with the PO_Num, you'd use

Me.TextBoxName = Me.YourComboBox.Column(0)

For the Company name

Me.TextBoxName = Me.YourComboBox.Column(1)

And likewise, for the ContactName

Me.TextBoxName = Me.YourComboBox.Column(2)

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/201005/1

From: golfinray on
The standard search form is to use a combo. Allow the combo wizard to do that
for you and select the field you want to search on. Then right click on the
combo to get properties, go to events, and then select the afterupdate event.
Type:
Me.filter = "[yourfieldyouaresearchingon] = """ % Me.combo# & """"
me.filteron = true
The combo# will be listed, like combo22 or combo10.
--
Milton Purdy
ACCESS
State of Arkansas


"RMorton" wrote:

> New to Access. I want to create a form that coworkers can use to lookup
> information in a database for inputting data into a PO as well as submit new
> records into the database. I want to have a control that is a combo drop down
> box where the can select a row from a list of items in a specified field and
> based on that selection it will update the below text box control with the
> corresponding data in the field next to it on the database. Make sense?
> Basically need to figure out how to update one control based on data selected
> from the drop down box control above it???