automatically fill in address

mfpoore

Registered User.
Local time
Today, 18:43
Joined
Mar 3, 2004
Messages
32
Hello,
I know this is simple (and probably listed here somewhere) I could not find it with the search mechanism.
I have a table populated with facilty names, address, state, zip, etc. On a form I choose the name of the facility from the a drop down box based on the table, and I want the street address, state, zip, etc. to automatically fill after I choose the facility name.
I know it should be simple but I cant remember how I did it before.

thanks,
mfpoore
 
Fill In

Suppose the box is named "DropBox" you could put this code in the AfterUpdate Event of the box:

Me.Address = Me.Dropbox.Column(1)
Me.City = Me.Dropbox.Column(2)

Of course you will have to adjust the Colums specification.
 
Have you considered just setting this up as a relationship where all you store is a facilty id in the forms underlying recordset / table?

kh
 
Populating fields on a continuous form

I was encountering the same problem, and found this VERY helpful demo somewhere in the archives here. (http://www.candace-tripp.com/download/combopopulate.zip)

I have used the method explained above and in the above demo, and it worked wonderful on a SINGLE FORM, but now when I try to do the same on a CONTINUOUS FORM, I run into some problems....

The continuous subform I want to populate shows vendor address/contact info for each job(main form). There are multiple vendors for each job, and I have tried all the examples contained in the above demo, but as my fields-to-be-filled are all unbound text boxes, when I select one vendor from the combo box, ALL of the vendors' address/contact info is changed to match the vendor in THAT combo box, rather than having their unique data.

I'm not picky about method, just so long as the info that is populated by the combo box is unique to each vendor, and the address info is clear for the user, any technique would be fine.

Humbly,
Blair Sly
 

Users who are viewing this thread

Back
Top Bottom