Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Autofill

Status
Not open for further replies.

mommom

Technical User
Nov 14, 2003
208
US
Good Morning,

I am trying to create a form that automatically fills in data on a new record. There a two tables: main and ports.
What I would like to do is when I type the name of the program if it was used in a previous would like the port number that is related to automatically fill in.

Any help will be appreciated.

 
check out DLookUp()... using the AfterUpdate Event for the control that is bound to the program, use DLookUp to add the result to the control that is bound to the port number.. an example might be

txtPortNum = DLookup("[PortNumField]", "Ports", "[Program] = '" & txtProgram & "'")

where txtPortNum is the TextBox on the form that will hold the Port Number from the field your PortNumField in the Ports table, and txtProgram is the control that holds the data for the program you just entered (text type not numeric)....

HTH, and isn't too confusing


PaulF
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top