I've created a entry form which has a look-up field for the machineID. I
would like that when the user selects the machineID in the look-up; other
fields (location, model) are populated. Is it possible and what is the
process?
I have a query for the machine selection and used it to create a subform.
But this doesn't accomplish my goal. The information isn't captured inthe
main form's table.
Try adding columns to a combobox and populating textboxes using the combo's
column property (aircode):
Sub cboWhatever_AfterUpdate()
Me.txtTextbox1 = Me.cboWhatever.Column(2)
Me.txtTextbox2 = Me.cboWhatever.Column(3)
End Sub
Which will read the third and fourth columns from the combo box

Signature
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
> I've created a entry form which has a look-up field for the machineID. I
> would like that when the user selects the machineID in the look-up; other
[quoted text clipped - 4 lines]
> But this doesn't accomplish my goal. The information isn't captured inthe
> main form's table.
Ropesend - 31 Jan 2008 16:22 GMT
I created the combo box. How do I add the columns to the combo box?
> Try adding columns to a combobox and populating textboxes using the combo's
> column property (aircode):
[quoted text clipped - 13 lines]
> > But this doesn't accomplish my goal. The information isn't captured inthe
> > main form's table.
Ropesend - 31 Jan 2008 18:18 GMT
I tried the combo box but it didn't provide me with what I wanted. It gave
the location on the form but it did not update the table's location, model.
Therefore, I created a separate table with the machine information; and
linked the machineIds. On my form, I let the text box fields update from the
lookup on the machineID field. Then run a query to print a report with the
information I needed. I shuld have mentioned the report. Your suggestion on
the combobox columns did present a new perspective. Thank you.
> Try adding columns to a combobox and populating textboxes using the combo's
> column property (aircode):
[quoted text clipped - 13 lines]
> > But this doesn't accomplish my goal. The information isn't captured inthe
> > main form's table.
Arvin Meyer [MVP] - 02 Feb 2008 18:16 GMT
If you already have the data in 1 location, you never need to repeat it.
That's why a relational database is superior to flat files and hierarchal
designs. The only thing that ever gets repeated is the Primary Key of the
main table to the Foreign Key values of the subtables. IOW, a design like:
ID - PK
FirstName
MI
LastName
PhoneNumber
if used in a second table only requires the ID field. A query joining the 2
tables on the ID field will always display all the required information.

Signature
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
>I tried the combo box but it didn't provide me with what I wanted. It gave
> the location on the form but it did not update the table's location,
[quoted text clipped - 30 lines]
>> > inthe
>> > main form's table.