Populate fields of form after entering data in one field

  • Thread starter Thread starter Wally Buckner
  • Start date Start date
W

Wally Buckner

Guest
How do you populate the fields of a form from data you've supplied to the form in another field?

For instance, I have a Person Billed Code. When I enter that code in a field, I want the name, address, city, state, zip, etc to appear in their appropriate fields after entering this one code.

Is this a Visual Basic issue?
 
I assume you wish only to view the information in unbound txtboxes. You do not need to save this info into another record. This would create redundant data and break normalization rules. You need only save the Person Billed Code to the record, the other info can be produced by relational joins. Anyway.........................

This is not all that hard to do, but extremely hard to explain. If you can email your db (if not too large) to me I will set it up for you and try to explain how I done it.

HTH
RDH
 
I am assuming that the person billed code is a unique customer ID that already exits in a customer table. On your form make the [Person billed Code] a combobox. Base the rowsource on a query which includes all the fields you want to autofil from your customer table. In you combobox properties set the column count to the number of fields selected for your query. Set the column heads to yes if you want to see the column headers. Set the column widths to display the columns you want to see. If the query has 5 fields and you want to display the first 3 fields enter 1";1";1";0;0 in the column widths. Be sure that the list width equals the sum of the column widths. Add an unbound text enter in the record source enter- =[Person billed code].[column](0). Add additional textboxes for each field in the query and make the rowsource {person billed code].[column](1),[person billed code}[column](2) etc. Once you select a bill code all the other boxes will fill automatically.
 

Users who are viewing this thread

Back
Top Bottom