DLookUp Lable and format

K

KAnoe

I have a DLookUp that I use to put the Address and phone number on all the
user forms and reports. THis way the user only need to input his ot her info
one time and it goes to all the forms and reports. I only have one issue the
phone number just looks like a number. Here is the code.

=DLookUp("L_A1","Labels") So looks like 1234567890

Would like to to look like this Phone (123) 456-7890

Can I do this?
 
A

Andi Mayer

I have a DLookUp that I use to put the Address and phone number on all the
user forms and reports. THis way the user only need to input his ot her info
one time and it goes to all the forms and reports. I only have one issue the
phone number just looks like a number. Here is the code.

=DLookUp("L_A1","Labels") So looks like 1234567890

Would like to to look like this Phone (123) 456-7890

Can I do this?

look for the Format() function in the help file
best is userdefinded format for strings or numeric values

depends what you want
 
K

KAnoe

Andi,

The help does not tell me how to put it in the DLookUp code. The Tabel
format is set to a phone number format.
 
F

fredg

I have a DLookUp that I use to put the Address and phone number on all the
user forms and reports. THis way the user only need to input his ot her info
one time and it goes to all the forms and reports. I only have one issue the
phone number just looks like a number. Here is the code.

=DLookUp("L_A1","Labels") So looks like 1234567890

Would like to to look like this Phone (123) 456-7890

Can I do this?
Does your DLookUp return the correct Phone Number for the person
selected?

=Format(DLookUp("[L_A1]","Labels"),"(@@@) @@@-@@@@")
 
Top