DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   MS Access and FileMaker Pro (http://www.daniweb.com/forums/forum128.html)
-   -   Formating a control in Access (http://www.daniweb.com/forums/thread100162.html)

peterv200 Dec 7th, 2007 7:22 pm
Formating a control in Access
 
I have a control in an access database that holds credit card numbers.

I want to format the control so that it only displays the last 4 digits the first 12 digits just displaying an X

so that it will appear like this XXXX XXXX XXXX 1245

What is the best way to achieve this.

Many thanks for your help

Regards

Peter

kb.net Dec 9th, 2007 6:36 pm
Re: Formating a control in Access
 
Hi,

I think there is no way to format part of the field directly in the table. Accordingy you may need to put it in a query and show it as:
Format(Left([CredNum],11),"XXXX XXXX XXXX " & Right([CredNum],4))
Noting that I have included the spaces into the text.


All times are GMT -4. The time now is 10:44 pm.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC