prefill form based on user data w/ a twist.

  • Thread starter Thread starter Daniel M
  • Start date Start date
D

Daniel M

I am having a problem figuring this out. Any help?

I have a table with the following info..

serialnumber
ESN
CustomerName

I have 3 boxes on my form, one for each.

I want to have the user enter in either ESN or Serialnumber and have the
customername automatically filled. This is easy enough but i also want to
fill in the other box that is not user entered.

IE:
senario1
user enters ESN
form prefills Serialnumber
form prefills Customername

senario2
user enters serialnumber
form prefills ESN
form prefills Customername

any suggestions on how to approach this? thanks.
 
Daniel,
Using ESN as an example...
Use a multi column combo box (ex.cboESN), bound to your ESN field, with a
query behind it that delivers columns
ESN, SerialNo, CustomerName.
On the Afterupdate event of the combo...
[SerialNo] = cboESN.Column(1)
[CustomerName] = cboESN.Column(2)
(cbo columns are referred to as 0, 1, 2, 3, etc)

Do a cboSerialNo to do SerialNo, ESN, CustomerName with the appropriate
AfterUpdate code.
User can enter into either one...
 
Back
Top