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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help: How to get an automatic address fill in on a form

Status
Not open for further replies.

kull

Technical User
Aug 2, 2000
7
CA
Hi Folks

This probably has a simple solution. I basically have one form that takes address data for clients and puts it into a client table. Instead of having to type the same address for the client's organization in over and over I would like to set the form up so that when I select their affiliated organization from a dropdown list (combo box source: a new organizations table with org name and address fields), their address information automatically fills in the textboxes for each part of their address on the form (which in turn, fills this info in on the client table). Can this be programmed or would the organizations and their associated addresses have to be kept separate and related to the clients table by a client identifier number?

Any ideas?
Thanks!
Steve
 
easy.
when you click a button get the values Address, city State and zip etc. save then to varuable MyAdd, Mycity, MyState etc.

then let the new values equal those
Me!Address1 = MyAdd
Me!City1 = MyCity
Me!State1 = MyState
Me!Zip1 = MyZip

or place the info in a recordset to save to another table

Dim db as database, rst as recordset
Set db = CurrentDb
Set rst = db.OpenRecordset("ClientTable")
rst!AddNew
rst!Address = me!Address
rst!City = me!City
rst!State = me!State
rst!Zip = me!Zip
rst!Update
rst.close
db.close DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top