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

Form data autopopulate

Status
Not open for further replies.

cheiboy

Technical User
May 9, 2003
96
0
0
CA
Hey guru's. I've been working with this form (S Contact Sheet)now for about two days . It's based off of a query (qryRepSiteVisits) with two tables(tblaAddresses and tblRepSiteVisits)in the query.

The form will be a data entry type of form that will assign a 'visit' (auto)number for each new entry, pulling info from the main Physician address table (tblAddresses), when the Reps enter the address number, I want the remaining address fields to autopopulate from tblAddresses and all this and the remaining visit information to be saved in tblRepSiteVisits.

Any assistance much appreciated.
 
Im afraid you will have to play with your recordset through coding...

you should start by having a look in this sites FAQS
 
when the Reps enter the address number"
Try using DLookup in the afterupdate event of your address number field to fill in remaining address fields.
 
Ok, I've put this on the form, in the ADDR text box, using DLookup («expr», «domain», «criteria») as a guide.

Would it then look like this:
DLookup ( [tblAddresses]![ADDR#] , «criteria»)
 
Why duplicating values from tblAddresses in tblRepSiteVisits ?
Have a look here:

Anyway, you may consider a combobox based on tblAddresses and then play with its Column property in its AfterUpdate event procedure.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
would the dlookup function populate the other address fields afterupdate. Probably so, but would the six address fields need the dlookup in the afterupdate property as well?

Oh, do I need the query for this?
 
The form properties is ordered by tblAddresses.ADDR#.
 
change the field your searching for...............

addr# i think would be ur criteria, and then populate every field with dlookup, but that is not the best way to go!! I warn you, PHV is right with his post.
 
If I go with the combo box, will the rest of the address fields auto populate when the address number is entered from tbladdress, if I use the dlookup function?
 
If you follow the combo way then you don't need the DLookUp function at all.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Nope, no luck, changed all the address fields and still not keeping them together or autopopulating. I've had problems with this database since I inherited it two months ago.
 
changed all the address fields
????
You need only ONE combo.
In its AfterUpdate event procedure you populate the relevant controls playing with the Column property.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Yeah, all the address fields, they're currently seperate
combo boxes

Address #
Practice Name
Address
City
State
Zip

These are fields from the tblAddress, linked by ADDR# to tblRepSiteVisit.

They enter by address number, so by entering the address number, the rest of the combo boxes should autofill from the tbladdress table to be stored in the tblRepSiteVisit. The rest of the form is a whole page of check boxes.

At my place of employment, I worked with a database that had this capability were the provider name was entered and upon exiting, the rest of the fields (provider ID and Specialty) were autofilled, not sure how that was set up, but they were seperate combo boxes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top