Automatically Change Year

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
I am having a problem with a database that i'm creating for a college.

The boys can enter for any grade which is called A, B, C, D, E and they can
enter the college at the begining of any of the 4 terms

I have a field on the application form of class they want to enter and of
term they want to enter.

now at the end of the year in september i want the computer to automaticaly
move them up to the next class
how can i do that?
 
You could run an update query at the end of each academic year to move the
Grade one letter up the alphabet:

UPDATE (YourTable)
SET Grade = CHR(ASC(Grade)+1);

Of course you have to handle those already in the E grade, unless they have
already been deleted from the database. If you put a validation rule on the
Grade column in table design so it won't accept anything other than A – E:

Between "A" And "E"

Then the query won't update the Grade E rows. You'll get a message telling
you how many won't be updated.

Ken Sheridan
Stafford, England
 
Ken Sheridan said:
You could run an update query at the end of each academic year to move the
Grade one letter up the alphabet:

UPDATE (YourTable)
SET Grade = CHR(ASC(Grade)+1);

Of course you have to handle those already in the E grade, unless they have
already been deleted from the database. If you put a validation rule on the
Grade column in table design so it won't accept anything other than A – E:

Between "A" And "E"

Then the query won't update the Grade E rows. You'll get a message telling
you how many won't be updated.

Ken Sheridan
Stafford, England
thank you so so much - that did it!
 
Hi
I thought this was working buy my grade names aren't from A to E they are
numbers is there anything different i should be writing in the code? it
doesn't update?

thanks for your help
 
Hi
I thought this was working buy my grade names aren't from A to E they are
numbers is there anything different i should be writing in the code? it
doesn't update?


In the first place you said the grades were A to E. Now you say
they're not.

Please explain. It would help if you could post a description of your
table structure and some sample records.

John W. Vinson [MVP]
 
I'm really sorry to sound confusing i got help from access help and together
with Ken Sheridans suggestion i managed to get it to work. Thanks a lot and
sorry.
 

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

Back
Top