Referring to form contents in RowSource

D

DKS

Dear,

On a form I have 2 fields, both originating from the table that is the
RECORD SOURCE for the form. Let's say these fields are FIELD-A (text box)
and FIELD-B (combo box).

I would like to refer to the contents of FIELD-A in the RowSource property
for FIELD-B. Thus when the form is displayed it displays the FIELD-A value
as available in the table. The possible values of FIELD-B are thus
calculated based on the RowSource property.

how can I do this?
 
S

scubadiver

A very similar idea is to use a cascading combo. This means you have two
combo boxes in which the second combo list is restricted depending on what
you choose in combo 1.

You can also do it from a text box (it's something I've never considered but
will work in exactly the same way)

Is this what you want?
 
D

DKS

Yes, that is what I need. But I do not seem to get it programmed correctly.
Can you help?

I did manage to do it in one particular manner but there I need to hit the
F9 (refresh) button in order for changes in "textbox1" to take effect in
combo list.
 
S

scubadiver

If you type something in a text box you can use a command button to refresh
the combo

combo.requery

or you can insert that line into the "after update" event if you use a combo
instead of a text box.

The combo should have two fields. One for the list and one for the
information you are searching for like:

A 1
A 2
A 3
B 4
B 5
B 6

The criteria in the combo would be

[forms]![form name]![text box name]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top