String with Varying Letter followed by Incremented Number

T

Tat

I'm new to Access and really don't even know how to ask what I need to
know, but I'll give it a shot and maybe you brilliant folks can figure
out what I mean.

We have three classes with students. Each student is assigned an ID.
The ID contains a letter which indicates which class the student
attends (L G or F) and that letter is followed by a 7 digit number
that increments with each student no matter which class they are in.

So our list might look like
L0000001
G0000002
F0000003

We're developing a database, but this information in our current
system has been kept in one field. Because we are familiar with this
data being kept in one field and because none of us developing the
database are incredibly advanced, we were hoping to keep it in one
field. The problem is that when entering the data, the class letter
must be picked and the 7 digit number incremented.

I've searched and read but I'm not certain how this can be done in
Access.

My question is: Can this be done in a form where two entires populate
one field in a table?

If it can't be done in one field, is there an alternative method you
could suggest?
 
P

Piet Linden

I'm new to Access and really don't even know how to ask what I need to
know, but I'll give it a shot and maybe you brilliant folks can figure
out what I mean.

We have three classes with students. Each student is assigned an ID.
The ID contains a letter which indicates which class the student
attends (L G or F) and that letter is followed by a 7 digit number
that increments with each student no matter which class they are in.

So our list might look like
L0000001
G0000002
F0000003

We're developing a database, but this information in our current
system has been kept in one field. Because we are familiar with this
data being kept in one field and because none of us developing the
database are incredibly advanced, we were hoping to keep it in one
field. The problem is that when entering the data, the class letter
must be picked and the 7 digit number incremented.

I've searched and read but I'm not certain how this can be done in
Access.

My question is: Can this be done in a form where two entires populate
one field in a table?

If it can't be done in one field, is there an alternative method you
could suggest?

http://www.mvps.org/access/strings/str0007.htm

The only problem would be if lots of people are entering data at
once...
 
B

Bill

Tat said:
I'm new to Access and really don't even know how to ask what I need to
know, but I'll give it a shot and maybe you brilliant folks can figure
out what I mean.
....
If it can't be done in one field, is there an alternative method you
could suggest?
.

Create a table with an AutoNumber id. Let's call the field "Id". Create a
field where the user will type in a letter, lets call the field "Letter". Now
you can create a query and use a calculated field:

StudentId: [YourTable].[Letter] & Right("000000" & [YourTable].[Id],6)

Put this in the "field" field in the Query Designer.
 

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

Top