Auto Populate fields based on another entered field

CTQE

Registered User.
Local time
Yesterday, 17:25
Joined
Feb 27, 2008
Messages
48
Hello All,

Based on one entry into a form, how can I have the form auto fill other fields that are related to that first entry?

Thanks in advance!
 
With the information you've given us, I'd say the only way would be thru the use of MAGIC!

The very general way is thru the use of the AfterUpdate event of the first textbox:

Code:
Private Sub CountryTextBox_AfterUpdate()
  If Me.CountryTextBox = "United States" Then
    Me.Flag = "Stars and Stripes"
  End If
  If Me.CountryTextBox = "Canada" Then
    Me.Flag = "Maple Leaf"
  End If
End Sub

I you have a lot of possibilities for the value in the first textbox, you might want to use the Select Case construct instead of using If...Then...End Ifs.

If you can give us a bit more information on what you're trying to do, myself or someone else here will be glad to help you further.
 

Users who are viewing this thread

Back
Top Bottom