|
 |
access thread: format a number
Message #1 by "carlier jacques" <jacques.carlier@c...> on Wed, 21 Aug 2002 15:53:46
|
|
Hi,
I have a number like : 473932900 (gsm number)
I would like to get in my report :
"473/93.29.00"
Which FORMAT$ instruction have i to use ?
J. CARLIER
BRUSSELS
thanks a lot.......
Message #2 by "Hamilton. Tom" <hamiltont@s...> on Wed, 21 Aug 2002 08:02:36 -0700
|
|
left(x,3) & "/" & mid(x,4,2) & "." & mid(x,6,2) & "." & right(x,2)
-----Original Message-----
From: carlier jacques [mailto:jacques.carlier@c...]
Sent: Wednesday, August 21, 2002 8:54 AM
To: Access
Subject: [access] format a number
Hi,
I have a number like : 473932900 (gsm number)
I would like to get in my report :
"473/93.29.00"
Which FORMAT$ instruction have i to use ?
J. CARLIER
BRUSSELS
thanks a lot.......
Message #3 by Beth Moffitt <BethMoffitt@i...> on Wed, 21 Aug 2002 10:08:35 -0500
|
|
J,
In the query which is based on your table containing the number data, write
the following expression:
F_Number: Left([FIELD_NAME],3) & "/" & Mid([FIELD_NAME],4,2) & "." &
Mid([FIELD_NAME],6,2) & "." & Right([FIELD_NAME],2)
Base the report on the query and select F_Number as your control for the
text box on the report. Works like a charm as long as your numbers are
always the same length.
Regards,
Beth Moffitt
Developer
INI, Inc.
xxx.xxx.xxxx x110
www.iniinc.com
-----Original Message-----
From: carlier jacques [mailto:jacques.carlier@c...]
Sent: Wednesday, August 21, 2002 10:54 AM
To: Access
Subject: [access] format a number
Hi,
I have a number like : 473932900 (gsm number)
I would like to get in my report :
"473/93.29.00"
Which FORMAT$ instruction have i to use ?
J. CARLIER
BRUSSELS
thanks a lot.......
Message #4 by John Fejsa <John.Fejsa@h...> on Thu, 22 Aug 2002 09:30:15 +1000
|
|
I would create another unbound field and use it to display formatted number on the report.
For example:
1) Place GSM Number on the report and set its Visibility to False (I called it intMyGSMNumber in my example)
.
2) Place unbound field on the report and make sure it's Visiblity is set to True (I called it txtMyFormattedGSMNumber in my
example.) You can place it on top of intMyGSMNumber so it's in the right place.
3) Format GSM Number and display in formatted result in unbound field as shown below.
Me!txtMyFormattedGSMNumber = Format(Me!intMyGSMNumber, "@@@\/@@\.@@\.@@")
This will display 473932900 number as 473/93.29.00 on your report in the unbound intMyGSMNumber.
Hope that helps.
____________________________________________________
John Fejsa
Systems Analyst/Computer Programmer
Hunter Centre for Health Advancement
Locked Bag 10, WALLSEND NSW 2287
Phone: (02) 4924 6336 Fax: (02) 4924 6209
www.hcha.org.au
____________________________________________________
The doors we open and close each day decide the lives we live
____________________________________________________
CONFIDENTIALITY & PRIVILEGE NOTICE
The information contained in this email message is intended for the named addressee only. If you are not the intended recipient you
must not copy, distribute, take any action reliant on, or disclose any details of the information in this email to any other person
or organisation. If you have received this email in error please notify us immediately.
>>> jacques.carlier@c... 22/08/2002 1:53:46 >>>
Hi,
I have a number like : 473932900 (gsm number)
I would like to get in my report :
"473/93.29.00"
Which FORMAT$ instruction have i to use ?
J. CARLIER
BRUSSELS
thanks a lot.......
Message #5 by John Fejsa <John.Fejsa@h...> on Thu, 22 Aug 2002 09:42:37 +1000
|
|
Disregad the last example paragraph.
This will display 473932900 number as 473/93.29.00 on your report in the unbound intMyGSMNumber.
It should read
This will display 473932900 number as 473/93.29.00 on your report in the unbound txtMyFormattedGSMNumber.
It so easy to press Send button before proof reading...
____________________________________________________
John Fejsa
Systems Analyst/Computer Programmer
Hunter Centre for Health Advancement
Locked Bag 10, WALLSEND NSW 2287
Phone: (02) 4924 6336 Fax: (02) 4924 6209
www.hcha.org.au
____________________________________________________
The doors we open and close each day decide the lives we live
____________________________________________________
CONFIDENTIALITY & PRIVILEGE NOTICE
The information contained in this email message is intended for the named addressee only. If you are not the intended recipient you
must not copy, distribute, take any action reliant on, or disclose any details of the information in this email to any other person
or organisation. If you have received this email in error please notify us immediately.
>>> John.Fejsa@h... 22/08/2002 9:30:15 >>>
I would create another unbound field and use it to display formatted number on the report.
For example:
1) Place GSM Number on the report and set its Visibility to False (I called it intMyGSMNumber in my example)
.
2) Place unbound field on the report and make sure it's Visiblity is set to True (I called it txtMyFormattedGSMNumber in my
example.) You can place it on top of intMyGSMNumber so it's in the right place.
3) Format GSM Number and display in formatted result in unbound field as shown below.
Me!txtMyFormattedGSMNumber = Format(Me!intMyGSMNumber, "@@@\/@@\.@@\.@@")
This will display 473932900 number as 473/93.29.00 on your report in the unbound intMyGSMNumber.
Hope that helps.
____________________________________________________
John Fejsa
Systems Analyst/Computer Programmer
Hunter Centre for Health Advancement
Locked Bag 10, WALLSEND NSW 2287
Phone: (02) 4924 6336 Fax: (02) 4924 6209
www.hcha.org.au
____________________________________________________
The doors we open and close each day decide the lives we live
____________________________________________________
CONFIDENTIALITY & PRIVILEGE NOTICE
The information contained in this email message is intended for the named addressee only. If you are not the intended recipient you
must not copy, distribute, take any action reliant on, or disclose any details of the information in this email to any other person
or organisation. If you have received this email in error please notify us immediately.
>>> jacques.carlier@c... 22/08/2002 1:53:46 >>>
Hi,
I have a number like : 473932900 (gsm number)
I would like to get in my report :
"473/93.29.00"
Which FORMAT$ instruction have i to use ?
J. CARLIER
BRUSSELS
thanks a lot.......
Message #6 by "carlier jacques" <jacques.carlier@c...> on Thu, 22 Aug 2002 08:41:15
|
|
===> Thank you to everybody for responding to
my call for help.
> Hi,
> I have a number like : 473932900 (gsm number)
> I would like to get in my report :
> "473/93.29.00"
>
> Which FORMAT$ instruction have i to use ?
> J. CARLIER
B> RUSSELS
>
t> hanks a lot.......
>
>
Message #7 by "Amy Wyatt" <amyw@c...> on Thu, 22 Aug 2002 21:24:22
|
|
An easier way is to add an imput mask to the controls property in the
report. (This is assuming the field itself is a text field). The imput
mask would look like this:
000/00.00.00;;_
Amy
> Hi,
> I have a number like : 473932900 (gsm number)
> I would like to get in my report :
> "473/93.29.00"
>
> Which FORMAT$ instruction have i to use ?
> J. CARLIER
B> RUSSELS
>
t> hanks a lot.......
>
>
|
|
 |