Filling in the gaps

  • Thread starter Thread starter anniegetyourgun
  • Start date Start date
A

anniegetyourgun

Hi,

I’m really stuck with this one. I have a field named Patient ID within this
field are numbers; unfortunately they are varied in length, from 4 digits up
to a maximum of 7 digits long.

My problem is: I need to make all of my Patient IDs 7 digits long, by
preceding them with zeros.

Eg: 4516 needs to read 0004516, 45167 needs to read 0045167 etc. etc.

I have no idea how to do this, any help would be greatly appreciated.

Annie
 
You can create an expression like:
Right("0000000" & [Patient ID], 7)
Use this to either update the field or just display the new value.
 
anniegetyourgun said:
I’m really stuck with this one. I have a field named Patient ID within this
field are numbers; unfortunately they are varied in length, from 4 digits up
to a maximum of 7 digits long.

My problem is: I need to make all of my Patient IDs 7 digits long, by
preceding them with zeros.

Eg: 4516 needs to read 0004516, 45167 needs to read 0045167 etc. etc.

I have no idea how to do this, any help would be greatly appreciated.


Don't do that. The numbers are correct as is. All you need
to do is format the numbers when they are displayed in a
form or report text box by setting the text boxes' Format
property to the custom format:
0000000
 
Marshall said:
IÂ’m really stuck with this one. I have a field named Patient ID within this
field are numbers; unfortunately they are varied in length, from 4 digits up
[quoted text clipped - 6 lines]
I have no idea how to do this, any help would be greatly appreciated.

Don't do that. The numbers are correct as is. All you need
to do is format the numbers when they are displayed in a
form or report text box by setting the text boxes' Format
property to the custom format:
0000000
Thanks. They both worked, i wish id thought of simply formatting the numeric
field in the first place. Homer Simpson moment.
 
Back
Top