A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

String with Varying Letter followed by Incremented Number



 
 
Thread Tools Display Modes
  #1  
Old March 10th, 2010, 06:10 PM posted to microsoft.public.access.tablesdbdesign
Tat[_2_]
external usenet poster
 
Posts: 2
Default String with Varying Letter followed by Incremented Number

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?
Ads
  #2  
Old March 10th, 2010, 07:57 PM posted to microsoft.public.access.tablesdbdesign
Piet Linden[_2_]
external usenet poster
 
Posts: 280
Default String with Varying Letter followed by Incremented Number

On Mar 10, 11:10*am, Tat wrote:
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...
  #3  
Old March 10th, 2010, 08:20 PM posted to microsoft.public.access.tablesdbdesign
Tat[_2_]
external usenet poster
 
Posts: 2
Default String with Varying Letter followed by Incremented Number

On Mar 10, 12:57*pm, Piet Linden wrote:
On Mar 10, 11:10*am, Tat wrote:





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...- Hide quoted text -

- Show quoted text -


That works if the beginning of the string is not varying. However, in
our case, the letter at the beginning is varying.
  #4  
Old March 13th, 2010, 12:28 AM posted to microsoft.public.access.tablesdbdesign
Bill
external usenet poster
 
Posts: 1,009
Default String with Varying Letter followed by Incremented Number



"Tat" wrote:

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.
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:02 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright 2004-2018 OfficeFrustration.
The comments are property of their posters.