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

DefaultValue From a Field ???

Status
Not open for further replies.

MasterFred

Programmer
Aug 8, 2002
1
CA
Hi !

I'm doing a kindergarden client database, some parents are divorces and some not, so I've made 2 fields for each parents, address_mom and adress_dad, but then parents aren't divorced, I would like the "defaultvalue" of the adress_dad to be the value of that's in address_mom, so I don't have to enter it twice, any idea how I could do this ?

Thanks !

frederic.gionet@sympatico.ca
 
You should go back a step or two and redefine your database structure. You need to read about about data normalisation to get thingsd right. It's a long subject, to long for this sort of post. send me an e mail if you need more help and I'll e mail you some background reading. Alternatively search the Microsoft knowledge base for an article on normalisation by E F Cobb.
 
Sorry - left off my e mail address - youmike@mweb.co.za
 
MasterFred,

Redefine and normalize the database is of course the right way to do it, but if you just want a quick solution. You can create a command button that copies the text from the first text box to the next. Something like this:

Code:
Private Sub cmdCopyAdressDadToMom_Click()
	Me.txtAdress_mom = Me.txtAdress_dad
End Sub

Hakan Haskel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top