Combo Box lookUp

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a table with 2 fields WS and WG. I need to create a form that allows
the user to enter in the WS number and its corresponding WG number will
populate in its field. How do I create this? I have created a combo lookup
box for the WS, but it only moves to the next record when the WS number is
entered.

Thank you
 
Binder,

Do you mean you already have a "master" table where the WS and its
corresponding WG are listed? And then you are trying to use a combobox
on a form to enter the WS into another table? And then you want the
corresponding WG to show on the form? Well, there are a number of
approaches to this. But one of them is *not* to have the WG in the
second table as well. Whenever you know the WS, you can always derive
the WG value, so it is not valid to store it a second time. One
approach would be to base your form on a query that includes both the
main table it is based on now, and also the WS/WG list table, joined on
the WS field from both. That way, you can include the WG field into the
query, and hence directly on the form. When you select the WS on the
form, the corresponding WG will automatically be shown. Another
approach is, if you are using a combobox for the entry of the WS, and
this combobox's Row Source is the WS/WG list table, you can put an
unbound textbox on the form, with its Control Source set to the
equivalent of...
=[WS].[Column](1)
 
Back
Top