Carryover (duplicate) field entries

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Greetings,
MS Access 2000

I am designing a database which among other things, has a field for the last
names of parents and a field for the last name of their children.
Since the vast majority of children have the last name of their parent, is
there away to code into the field name for the chidren to default to the
input of the field for the last name of the parent?
Thank you in advance for your help
 
Since the vast majority of children have the last name of their
parent, is there away to code into the field name for the chidren to
default to the input of the field for the last name of the parent?

Use the AfterUpdate event of the form to copy it across:

if isnull(txtParentLastName) Then
' do nothing, it's still blank

elseif not isnull(txtChildLastName) Then
' do nothing, the target is not empty
' don't write over what the user has already entered!!

else
txtChildLastName.Value = txtParentLastName.Value

end if

Hope that helps


Tim F
 
How about using the AfterUpdate event on the field for Parent Last Name to
set the value:

Me.ChildLastName = Me.ParentLastName

Add error and null-handling as desired.
 
Tim,
Thank you for your response. I'm sorry I can't give you any feedback yet on
whether or not it solved my problem. My programming ability is very limited.
I again appreciate you sharing your time and knowledge.
r,
Rich
 
Mr. Kingston,
Thank you for your response. I'm sorry I can't give you any feedback yet on
whether or not it solved my problem. My programming ability is very limited.
I again appreciate you sharing your time and knowledge.
r,
Rich
 
Back
Top