Input Mask

G

Guest

Hello. I am trying to create an input mask of the following:
060131SB01

Here is what the numbers and letter represent:

06=Year
01=Month
31=Day
SB=CityName (it could be SB, SM or LO)
01= Batch Number ( It could be any number 01 through 50, the single numbers
need a leading zero i.e. 01 02 03....

Could you please help? Your help would be greatly appreciated.

Thanks.
Iram/mcp
 
R

Rick B

Generally, you would not want to do this. Each field in a database should
contain one piece of information. In my opinion, this is three fields...

RecordDate
CityName
BatchNumber


You can then take these three fields and display them in the format you
mention on your forms, reports, and queries by formatting and concatenating
the three fields.

=Format([RecordDate],"YYMMDD") & CityName & BatchNumber
 
G

Graham Mandeno

Hi Iram

You could use an input mask such as 000000LL00.

However, this would allow *any* digits and letters, so "123456WW99" would be
valid.

You would also need to use a BeforeUpdate event procedure to parse the
different parts and check them for validity.
 
G

Guest

Thanks guys. I am probably going to use the "000000LL00" only because this
field is the Primary Key. I really did like the idea of the concating and I
can use it for another issue that I need to fix.

Thanks.
Iram/mcp



Graham Mandeno said:
Hi Iram

You could use an input mask such as 000000LL00.

However, this would allow *any* digits and letters, so "123456WW99" would be
valid.

You would also need to use a BeforeUpdate event procedure to parse the
different parts and check them for validity.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

Iram said:
Hello. I am trying to create an input mask of the following:
060131SB01

Here is what the numbers and letter represent:

06=Year
01=Month
31=Day
SB=CityName (it could be SB, SM or LO)
01= Batch Number ( It could be any number 01 through 50, the single
numbers
need a leading zero i.e. 01 02 03....

Could you please help? Your help would be greatly appreciated.

Thanks.
Iram/mcp
 
G

Guest

Again thanks.

How can I put "back slashes" and "dashes" in the mix i.e. 06\02\08-SB-01 ?

Thanks.
Iram\mcp.



Graham Mandeno said:
Hi Iram

You could use an input mask such as 000000LL00.

However, this would allow *any* digits and letters, so "123456WW99" would be
valid.

You would also need to use a BeforeUpdate event procedure to parse the
different parts and check them for validity.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

Iram said:
Hello. I am trying to create an input mask of the following:
060131SB01

Here is what the numbers and letter represent:

06=Year
01=Month
31=Day
SB=CityName (it could be SB, SM or LO)
01= Batch Number ( It could be any number 01 through 50, the single
numbers
need a leading zero i.e. 01 02 03....

Could you please help? Your help would be greatly appreciated.

Thanks.
Iram/mcp
 
J

John Spencer

I think that would be the following input mask.

00\\00\\00\-LL\-00

For a nice discussion, try putting the cursor in the Input mask property and
pressing the F1 key - you should get the help page for this.


Iram said:
Again thanks.

How can I put "back slashes" and "dashes" in the mix i.e. 06\02\08-SB-01
?

Thanks.
Iram\mcp.



Graham Mandeno said:
Hi Iram

You could use an input mask such as 000000LL00.

However, this would allow *any* digits and letters, so "123456WW99" would
be
valid.

You would also need to use a BeforeUpdate event procedure to parse the
different parts and check them for validity.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

Iram said:
Hello. I am trying to create an input mask of the following:
060131SB01

Here is what the numbers and letter represent:

06=Year
01=Month
31=Day
SB=CityName (it could be SB, SM or LO)
01= Batch Number ( It could be any number 01 through 50, the single
numbers
need a leading zero i.e. 01 02 03....

Could you please help? Your help would be greatly appreciated.

Thanks.
Iram/mcp
 
G

Guest

It worked. Thanks a million John.

Iram/mcp.



John Spencer said:
I think that would be the following input mask.

00\\00\\00\-LL\-00

For a nice discussion, try putting the cursor in the Input mask property and
pressing the F1 key - you should get the help page for this.


Iram said:
Again thanks.

How can I put "back slashes" and "dashes" in the mix i.e. 06\02\08-SB-01
?

Thanks.
Iram\mcp.



Graham Mandeno said:
Hi Iram

You could use an input mask such as 000000LL00.

However, this would allow *any* digits and letters, so "123456WW99" would
be
valid.

You would also need to use a BeforeUpdate event procedure to parse the
different parts and check them for validity.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

Hello. I am trying to create an input mask of the following:
060131SB01

Here is what the numbers and letter represent:

06=Year
01=Month
31=Day
SB=CityName (it could be SB, SM or LO)
01= Batch Number ( It could be any number 01 through 50, the single
numbers
need a leading zero i.e. 01 02 03....

Could you please help? Your help would be greatly appreciated.

Thanks.
Iram/mcp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Input Mask: SB-01 9
Input Mask for SB-01 1
Input Mask 0123456789-12 4
changing the Phone Number Input Mask to all for extensions 2
Sumproduct? 1
.BAT: Delete oldest file? 6
Input Mask 1
SSN Input Mask 1

Top