473,394 Members | 1,709 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Help with... er... not sure how to describe this

Hello all

I'm not sure how to word this, which is one reason why I couldn't find
anything on Google to help me, so please bear with me as I try to
explain myself...

I am trying to create a database for a youth club, with relevant info on
members, non members, who attended what activity when etc etc. The
thing I am trying to do is, each youngster will be in a particular year
group in school (i.e. first year, second year etc), I have a simple
table with member records (the basics: name, date of birth, address,
next of kin etc), and one table for year groups, and each member will be
linked to the year group they belong to.

The thing I am trying to figure out how to do is, when the next year
comes, what is the best way for me to go in and change the year group
collectively? Like for instance, how do I change all the first year
kids to second year? And second to third? And so on... The only way I
could think of is going into each record and changing manually, but not
exactly ideal when we're working with over 50 kids per year group and
potentially into 4 figures for the whole club...

Does anyone have any suggestions or solutions? I tried to look for
school database examples on google but instead I get a bunch of "how to
do databases" from school websites lol

I'm guessing there is some kind of macro or programming that can be used
to do this, but I just don't know what that is, can someone please point
me in the right direction?!

Thanks so much in advance for the help and time

Kind regards
Will
Nov 13 '05 #1
4 1202
can't you calculate the year group they belong to? What's the rule for
that? Is it based on the child's age, or on the year the child joined?
Then you can use DateDiff() to figure it out on the fly - and you
won't ever have to update the stuff manually. then when the next year
comes, your query will rerun and will automatically update itself. Or
you could make the value static (may be necessary) and use an update
query to change it.

Nov 13 '05 #2
adm
the short answer, as pietlin explains, is to use an update query.
Access lets you create these using Query Wizard, etc. To do it with a
simple SQL statement, it would be something like:

UPDATE tblStudents SET YearGroup = "Second" WHERE YearGroup = "First"

Create a different update query for each year group. Make sure you are
careful about the order you run them in...otherwise you'll put all the
first years in with the 2nd years, and then you won't be able to
distinguish them.

But as pietlin explained, you should probably reconsider this way of
tracking things and base it on something calculable(sp?) instead.

Nov 13 '05 #3
"adm" <ad*****@yahoo.com> wrote in
news:11**********************@f14g2000cwb.googlegr oups.com:
the short answer, as pietlin explains, is to use an update
query. Access lets you create these using Query Wizard, etc.
To do it with a simple SQL statement, it would be something
like:

UPDATE tblStudents SET YearGroup = "Second" WHERE YearGroup =
"First"

Create a different update query for each year group. Make sure
you are careful about the order you run them in...otherwise
you'll put all the first years in with the 2nd years, and then
you won't be able to distinguish them.

But as pietlin explained, you should probably reconsider this
way of tracking things and base it on something
calculable(sp?) instead.

Or modify the table slightly, change the yeargroup to a number.
Then at the change of year, run an update query that adds one to
every row. An enhancement would be to add a lookup table with two
columns, the number and its description.

--
Bob Quintal

PA is y I've altered my email address.
Nov 13 '05 #4
Bob Quintal wrote:
"adm" <ad*****@yahoo.com> wrote in
news:11**********************@f14g2000cwb.googlegr oups.com:

the short answer, as pietlin explains, is to use an update
query. Access lets you create these using Query Wizard, etc.
To do it with a simple SQL statement, it would be something
like:

UPDATE tblStudents SET YearGroup = "Second" WHERE YearGroup =
"First"

Create a different update query for each year group. Make sure
you are careful about the order you run them in...otherwise
you'll put all the first years in with the 2nd years, and then
you won't be able to distinguish them.

But as pietlin explained, you should probably reconsider this
way of tracking things and base it on something
calculable(sp?) instead.


Or modify the table slightly, change the yeargroup to a number.
Then at the change of year, run an update query that adds one to
every row. An enhancement would be to add a lookup table with two
columns, the number and its description.


Thanks to everyone for the responses (for some reason btopenworld didn't
pick up pietlan's reply, had to go to Google to find it!), really
appreciate it!

The problem with the calculation method is that you could have different
aged kids belonging to the same year group, so it's hard to define them
that way, but it looks like an Update query is the way to go... at the
moment, I do have a lookup table for the year groups, I just wasn't sure
how to do the actual updating from one year group to another
collectively, but I'm gonna try the Update query one... I guess it's
just making it so that it Updates in the right order!

Thanks once more for everyone's time and help, most appreciated.

Cheers!
Will
Nov 13 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Graham Mattingley | last post by:
Hi Group, I have three tables for a mailing list app I am trying to right... I want to try and avoid running 3 selects inside eachother.. The LIST table is a list of people what have registered...
5
by: Sparrow | last post by:
I have created a table with the following columns... Date(datetime),Actual (Int),Planned (Int) I need to insert weekending dates starting from 23/04/04 looping thru'for the next 52weeks...
37
by: Tim Marshall | last post by:
From http://www.mvps.org/access/tencommandments.htm 9th item: Thou shalt not use "SendKeys", "Smart Codes" or "GoTo" (unless the GoTo be part of an OnError process) for these will lead you...
1
by: Paul | last post by:
Hi, I'm developing a search facility for my web app. In order for the search criteria to be valid the user must (a) enter some text in a text box and check and least one checkbox (of which there...
2
by: Goober | last post by:
I have the following default.aspx page that works properly. However, what I want to do is to link the graphics within it (that are hard coded now in the default web page) to our corporate...
15
by: DavidS | last post by:
Have Visual Studio.NET installed on MS 2000 Professional OS laptop. No issue ever with web development and SQL connections. Purchased new laptop with XP Professional SP2!!!!!!!! & Visual...
7
by: Brett | last post by:
I'm not sure why I keep getting this error, "Object reference not set to an instance of an object". Private Function somefunction() as string Dim MyCurrentClass As New Class1 Try For i As...
4
by: Dave G | last post by:
I've just been informed that an Access 2003 based system in use at one of my customers now needs to send data in the form of an XML file to a webservice. They told me it was simple - but I don't...
2
by: ahmadoubay_20240 | last post by:
The assignment aims at enforcing the encryption and communication techniques. It helps the student in acquiring the necessary knowledge in developing client/server application and in securing...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.