Autopopulated Field Based on Range of Data

G

Guest

I am having trouble figuring out how this would be done, and would greatly
appreciate any help.

FYI this is on a switchboard gui. In Field A, someone can type in a specific
number. I would like Field B to autopopulate with information based on what
is in Field A. Field B’s information will come from a value range.



This is an example of possible table data



Field A Field B

Range 1000-1999 H/K

Range 2000-2999 Cyp

As you can see, if someone types in a number such as, 1520 in Field A, it
would return the value of H/K to Field B. If someone were to type in the
value 2000 into Field A, it would return the value of Cyp in Field B.



If you need any clarification, please let me know



Thank you for your time,



Chase Dafnis
 
M

Marshall Barton

Chase said:
[] In Field A, someone can type in a specific
number. I would like Field B to autopopulate with information based on what
is in Field A. Field B’s information will come from a value range.

This is an example of possible table data

Field A Field B

Range 1000-1999 H/K

Range 2000-2999 Cyp

As you can see, if someone types in a number such as, 1520 in Field A, it
would return the value of H/K to Field B. If someone were to type in the
value 2000 into Field A, it would return the value of Cyp in Field B.


The range table needs two fields for the low and high values
of the range:
Low High Descr
1000 2000 H/K
2000 3000 Cyp
. . .

Then you can set text box B's control source expression to:

=DLookup("Descr", "range table", txtboxA & ">=Low And " &
txtboxA & "<High")
 

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