Link to home
Start Free TrialLog in
Avatar of gbnorton
gbnortonFlag for United States of America

asked on

Autonumber records returned in a query

I have a table that does not have an ID autonumber field.  I use a query for a combo box that returns several records.  Normally I would use the ID field to select the record for populating text boxes.  Now, no matter which record is selected, the first one is used to populate.  What is another way to select a record from a combo box that doesn't have an ID field?

Thanks,
Brooks
Avatar of plusone3055
plusone3055
Flag of United States of America image

order by a name

 if you had a selection that had names of fruit
strFruit

Apples
Oranges
Grapes
Peaches

ORDER BY
strfruit DESC
order by a name

 if you had a selection that had names of fruit
strFruit

Apples
Oranges
Grapes
Peaches

ORDER BY
strfruit DESC

which would return
Apples
Grapes
Oranges
Peaches
Avatar of gbnorton

ASKER

I'm not following you.  I have a combo box based on a query that returns records like this:
GAC0501   OZ150UFG   A   B   123
GAC0501   RZ147          B   R   345

I use code like this to populate text boxes from the combo box selection:
Me.txtPartNumber = Me.cboGlassingLot.Column(1)
Me.txtEvapLot = Me.cboGlassingLot.Column(2)

But in this case, whether I select the first record or the 2nd, the text boxes are always filled with the data from the first record.

Thanks,
Brooks
ASKER CERTIFIED SOLUTION
Avatar of gbnorton
gbnorton
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Solved by me.