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!

Lookup a value of another field in the same table 1

Status
Not open for further replies.

splats

Technical User
Jan 2, 2003
131
Hello there

I have a table that has contact info. I would like the daytimeContact field to be a default value of the workPhone field. so that when a user types in a work phone number, it will automatically go into the DaytimeContact field. Is there a way to do this in the table? I would also like the user to have the option to change the daytime contact number field to another number if necessary.

TIA
 
In the WorkPhone_AfterUpdate event you can put :-


Private Sub WorkPhone_AfterUpdate ()

If IsNull(DayTimeContact) Then
DayTimeContact = WorkPhone
End If

End Sub


The If IsNull bit just prevents the code from overwriting an existing number in the case there the user has typed the DayTimePhone info in before getting to the WorkPhone
oh yes they could - you know they could !!!


'ope-that-'elps.



G LS
accessaceNOJUNK@valleyalley.co.uk
Remove the NOJUNK to use.
 
thanks a bunch LittleSmudge

It works great!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top