I quick question (1 Viewer)

Vu_Ho

Registered User.
Local time
Today, 09:55
Joined
Aug 19, 2013
Messages
20
Please any one tell me how to this:
I have two fields, one is the Client_Name, the other is the Clients_Address. I want the Clients_Address to be filled out automatically if and when the Clients_Name already are in the database.
Thanks
 

plog

Banishment Pending
Local time
Today, 11:55
Joined
May 11, 2011
Messages
11,646
I smell a whiff of an improperly structured database.

1. What table is this form bound to?
2. What table is the Client_Name and Clients_Address? Is it more than one table?

The correct way to do this is to have 1 table that establishes the Client_Name/Clients_Address relationship. This table would assign a unique primary key to every record (ClientID). Then when you needed Client information in another table, you would just put the ClientID value in there. When you needed to display information from the client table you would use a DLookup.
 

Vu_Ho

Registered User.
Local time
Today, 09:55
Joined
Aug 19, 2013
Messages
20
Actually here is the situation:
I have a table inherited from someone else which was built from Excell. Every thing is a mess in that table (lol):
He put all data in one piece: Clients_Name, Clients_Address, Clients_City, Clients_States, Service_Use, Tracking_Number...etc.
Consequently, I try to migrate the thing with Access, which I think is more appropriate, so I imported the table into the database, and tried to split the table into 3 different ones: Clients, Services, Address and now I am quite confusing as not sure how to go around with the relationships, especially with the Client and Address one.
Any view on this?
 

boblarson

Smeghead
Local time
Today, 09:55
Joined
Jan 12, 2001
Messages
32,059
You shouldn't be putting in the address more than one time ever in the database for that customer unless they move. You put it in once and then in the other tables you only select the customer which should store their ID (primary key from the customers table) and the rest you can have DISPLAY but not actually store.
Here's a sample from my website which shows how you display the info but not store it again:
http://downloads.btabdevelopment.com/Samples/combos/Sample-FillInFields.zip
 

plog

Banishment Pending
Local time
Today, 11:55
Joined
May 11, 2011
Messages
11,646
Read up on Database Normalization (https://en.wikipedia.org/wiki/Database_normalization). Work through some online tutorials and then try to tackle this.

If you want, post your raw Excel files and then what you think your tables should be and we can help. I'd do that in a seperate post--in the Tables section. You have a few hurldes to clear before you're ready to start working on your forms.
 

Users who are viewing this thread

Top Bottom