copying a number of fields at once ???

Muzicmn

Registered User.
Local time
Today, 15:00
Joined
Nov 3, 2002
Messages
78
Hi

I am working on a db that keeps track of parent information. The particular form i am working on has a subform with "Tab Controls" . In each tab control i have a seperate form.

Pblm1: On the main form the individuals name is entered in a field. How can i get the parents last name field (which is in a subform under one of my tabs to automatically fill in to match the last name of the child.

Pblm 2: I used a code Pat gave me:

If IsNull (Me.[Spouse_Last]) Then
Me.[Spouse_Last] = Me.Last
End If

Now this code worked great for what i asked her for but now i need to adjust it a bit. I am trying to have ACCESS automatically update a few fields (address, city, state, zip etc...) of parent 2 to match parent 1 if the married (yes/no) button is pushed.

I have tried several ways and have not been able to make it work yet

thanks ahead of time

Ricky
 
I would suggest a change in design. Rather than storing address information "in" each record, link to it. This has two benefits. The first is that it will minimize the impact and burdon of address changes. The second is that it will reduce your storage requirements.

So create a new table - tblAddress that includes just address information. If you only need to store a single address per person, store the fk to the Address table in the person table making a 1-many relationship. If you need to store multiple addresses per person, the relationships get more complicated and become many-to-many. Plus they need a "role" code so you know which address is used for which purpose in each relationship.

I would also adopt the idea of a "head of household" and one of the related records essentially becomes the "master". Each of the other records has a fk to this "master". This will make it easier to pick out the correct Address record to link to.

One more thing, when an address changes, you need to find out if the change is for everyone using the address or only for the person being changed.
 

Users who are viewing this thread

Back
Top Bottom