General discussion

Locked

Access 2003 - Feild size of Textbox

By dsivik ·
I have a two qustions.

1. I have a 11 digit number that I would like to desplay in 3 different textboxes on a form.
Box 1 = First 4 digets
Box 2 = Next 5 digits
Box 3 = Last 2 digits

Anyone have any ideas or thoughts?

2. Can you set up a text box to only desplay 5 digets that are seperated by "-", simmilar to how Social Security numbers are seperared. The 11 digit number is formatted like this "2H03-55340-01", I would like to only dispaly the "55340".

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

the easiest way

by Tink! In reply to Access 2003 - Feild size ...

as far as time and speed, would be to have the number inputted in the 3 different text boxes and then just have Access combine the 3 fields to display as a full 11 digit number in a box.

However, if you absolutely have to have it where the 11 digit number is entered in one field and then split up by Access, it CAN be done. You'll just have to have Access GET the characters. I'll post back when I have the time on details. Course someone else might before I get back.

Collapse -

Well you had me well confused there

by Tony Hopkinson In reply to Access 2003 - Feild size ...

Until I noticed the - and the H in the number....

No I'm still confused, there's thirteen chars in that.

If you are going to deal with the 'number' in parts, presumably they have meaning and their own subrules. If so store it in parts and then join it up for say reporting purposes.

Select Part1 + '-' + Part2 + '-' + Part3
will do that.
If parts of it are really numeric ie no Hs !
Then you want teh SQL Function DataLength, Convert and Replicate.

If you want to break it up from 11 chars, then the SQL function you want is substring, in access you can use left$, mid$ and right$, or just mid$

HtHs

Me I'd be using the columns, seeing as it you beak it up, and data entry is involved you are going to have to join it up anyway.

Collapse -

Create an Input Mask in the table design

by arkman In reply to Access 2003 - Feild size ...

Create an input mask the same as you would for a phone number.
This will display the 11 characters together with the "-".

Back to Software Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums