473,385 Members | 1,942 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,385 software developers and data experts.

Duplicating data and all related data for next year

I am writing a database that handles all of the information for
courses offered at a school. Each course id is unique based on
school year id and course id. I need to duplicate the course names,
and other related infor for the next year. How can I best accomplish
this?
Thanks
Bill Hesson
Nov 13 '05 #1
4 1364
Bill,

Consider another approach. How about these tables:

TblStudent
StudentID
etc

TblCourse
CourseID
etc

TblSchoolYear
SchoolYear

TblCourseRegistration
CourseRegistrationID
StudentID
CourseID
SchoolYear

For data entry use a main form based on TblStudent and a subform based on
TblCourseRegistration. Use a combobox to select the course in the subform. Put
an unbound combobox in the main form to select the SchoolYear. To fill the
SchoolYear field in the subform, put the following code in the AfterUpdate event
of the CourseID combobox:
Me!NameOfSchoolYearTextBoxInSubform = Me!NameOfSchoolYearTextBoxInMainForm
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com
"Bill Hesson" <wh*****@cox.net> wrote in message
news:cb**************************@posting.google.c om...
I am writing a database that handles all of the information for
courses offered at a school. Each course id is unique based on
school year id and course id. I need to duplicate the course names,
and other related infor for the next year. How can I best accomplish
this?
Thanks
Bill Hesson

Nov 13 '05 #2


Thanks for the response!! the database is set up the way you suggested.
what I am trying to do is provide a way for the users to enter the
course information by having the courses automatically entered from last
year and then just edit them from there. so I am thinking of using an
append query to select the dasired year to copy the course info from and
what year to copy it to. my problem with that is that I want to use a
combo box to fill the year to copy from and the year to copy to. what
do you think. I haven't been able to figure out how to use combo boxes
in a query unless I possibly use a form to fill the query fields.
thanks again!!

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #3
Bill -

Using a form to capture This Year and Next Year is probably the best approach:

Insert Into MyTable (Year, OtherStuff)
Select Forms!MyForm!NextYear, OtherStuff
From MyTable
Where Year = Forms!MyForm!ThisYear

Where NextYear And ThisYear are the combo boxes on MyForm.

- - The bound column of each combo box is the year
- - Query will need to do a type conversion if MyTable.Year is numeric
- - For example: CLng(Forms!MyForm!NextYear)

Haven't checked this for syntax but you get the idea.

- Brian

On 30 Jul 2004 02:05:19 GMT, Bill Hesson <wh*****@cox.net> wrote:


Thanks for the response!! the database is set up the way you suggested.
what I am trying to do is provide a way for the users to enter the
course information by having the courses automatically entered from last
year and then just edit them from there. so I am thinking of using an
append query to select the dasired year to copy the course info from and
what year to copy it to. my problem with that is that I want to use a
combo box to fill the year to copy from and the year to copy to. what
do you think. I haven't been able to figure out how to use combo boxes
in a query unless I possibly use a form to fill the query fields.
thanks again!!

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Nov 13 '05 #4
Thanks a bunch, it works great!!

Bill Hesson
Tech Specialist II
El Cajon Valley High School

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #5

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

Similar topics

4
by: Nomen Nescio | last post by:
can anyone be so kind as to look at http://www.mysolution.ws/HYPOCRITE.php and let me know why it isn't passing the form data to http://www.mysolution.ws/insertHYPOCRITES.php for the most...
4
by: Robert | last post by:
Have main form with an unbound subform1 which is used for data entry. Subform1 has a nested continuous unbound subform (subform2) which is used to enter multiple records related to the record being...
8
by: Josetta | last post by:
I have found a wealth of information here on how to duplicate records in forms with subforms. I have adapted code found here to work with my forms. It works beautifully the first time I hit the...
0
debasisdas
by: debasisdas | last post by:
This article consistes of some of the frequently asked date related queries. Hope the users find it useful. ========================== 1.Determining the Date of the First and Last Occurrence of a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.