Auto Fill

  • Thread starter Thread starter BMaerhofer
  • Start date Start date
B

BMaerhofer

Hello,
I am trying to figure out how to code a form so that when someone types in a
particular SSN (111-11-1111) it will prefill the first and last name. (WIC /
WIC)

The text box names are as follows:
txtSSN
txtFirstName
txtLastName


THANKS!
 
The easiest is:

The field they enter the SSN in should be a combo box
with the underlying query having at least the three fields ssn,
first name, last name
you can have 1 or all three showing depending on how you want to
display the dropdown.

Assuming that they three fields are in that sequence in that query

In the afterupdate event of the combo put:
me.txtssn = me.comboboxname.column(0)
me.txtfirstname = me.comboboxname.column(1)
me.txtflastname = me.comboboxname.column(2)

Notes:
The column count is based on 0 being the first column.
Use Distinct in the query if the source for SSN has more than one
entry per SSN
You need to decide whether or not you will allow new SSNs to be
entered via this or not (set the limittolist to the appropriate value)
If only SSN is to show in the dropdown then
the columns will be three
column widths will be 1.1;0;0
bound column will probably be 1
probably should sort by SSN


Ron
 
Back
Top