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

Use Format in DLookup?

Status
Not open for further replies.

tis9700

Technical User
Jun 18, 2003
100
US
Hi all,
I'm working with an ADP Access 2002 FE and a SQL Server 2000 BE.

Just wondering...
I'm using a Dlookup function to return a messagebox if a Social Security Number is already in use. In SQL Server it's stored with no template characters, 555555555.

On the ADP, I have an input mask 000\-00\-0000.

However, when the messagebox displays the SSN is in the format from the server with no template characters.

Can I use Format in the Dlookup function to display the SSN with the template characters, 555-55-5555?


Dlookup("studSSN", "Students_Temp", "studSSN = '" & Forms!frmStudentDataEntry.Forms!studSSN & "'")


Thanks and have a nice day!
 

Code:
format(Dlookup("studSSN", "Students_Temp", "studSSN = '" & Forms!frmStudentDataEntry.Forms!studSSN & "'"),"000-000-000")
 
Thanks pwise! It's always the liitlethings that hold me up.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top