import or update into a combo box field from a non combo field

roi8877

New member
Local time
Today, 02:38
Joined
Jun 1, 2009
Messages
7
Hi,

I have 2 tables A and B. A table has a field that is a combo box obtained from a query from another table say C.

Table B is an import from excell and so I intend to populate table A with it. Im able to update other fields on table A but not this particular field that is a combo box.

Is it even possible to run an update query that would update field from B which is a text field to the matching field on A that is a combo box of type number. Although the field on A is a number field and combo box, it shows text as its contents. I suppose this is because of its bounding...so a text could show up representing the data/column it is bounded to.

I know right off the bat that a number field and text field will not work on an update query....

What might be the solution to get this data onto table combo field A from a text field B ?

Thanks.
 
The A combo is a number field with a lookup to display the text.
The Excel table is the text.

In your update query join tableB to table C on tableB.textfield = tableC.textfield and set tableA.combofield = tableC.IDfield WHERE tableA.somefield = tableB.somefield

If it was into a combo on a form, lookup table C to find the number that matches the Excel field text.
DLookUp("IDfield", "tableC", "tableC.textfield=tableB.textfield")
 
This works like a charm. :)

Thank you very much. :)

Now I have to drill this in my head. Important concept. :)

Because easily many things stems for joins of all sorts....:)

Thanks!

The A combo is a number field with a lookup to display the text.
The Excel table is the text.

In your update query join tableB to table C on tableB.textfield = tableC.textfield and set tableA.combofield = tableC.IDfield WHERE tableA.somefield = tableB.somefield

If it was into a combo on a form, lookup table C to find the number that matches the Excel field text.
DLookUp("IDfield", "tableC", "tableC.textfield=tableB.textfield")
 

Users who are viewing this thread

Back
Top Bottom