R
Redbeard
First - apologies for a long post. But I figured it is best to lay the
whole situation out rather than explain my problem in isolation.
You should know that I'm a high school teacher who took a month long
Access class back in the Access 97 days, and have hardly used it since.
I also do some Java programming on the side, but I've only tinkered
with VB. So I have big gaps in my knowledge base, but I have been able
to write a few modules as well as use the visual tools.
I'm trying to create a database for my school to use to keep track of
textbooks, and I've been "reteaching" myself as I go, but I've run into
a hurdle that has stumped me. I have two external tables that contain
student information by semester - Sem1 and Sem2. I have a second table
StudentTexts with the StudentID* (*key field) and fields for up to
seven textbooks (one AP course uses seven different books). I also
have TextbookData (ISBN* (*key field), Publisher, Author, etc.) and
CourseData (CourseNum* (*key field) and ISBN's for each text used).
Lastly, I have a table that (eventually) will contain a list of every
textbook used at our school. Right now, its fields are ISBN (so it can
link to TextbookData) and TextID. Neither can be a key field.
Obviously, if you have 200 Algebra books, they all have the same ISBN
number, but different ID numbers. But it is likely that there are
Algebra books and English books that have the same ID number. I've
considered making separate tables for each textbook so the ID could be
the key, but that complicates other problems. If necessary, I could
create a calculated field that combines the two which could be a key.
I've got everything working except ONE thing. I have a form which
allows me to select textID's out of a combobox for each student and
each of the seven possible textbooks and put that data in the
StudentText table. Each combobox uses a query to list the TextID's for
the appropriate books. I have the combobox set to LimitToList. If
something that is NOT on the list is entered, I can intercept that data
and ask the user if they want to add it to the list.
FINALLY - here is my problem. (Thanks for waiting)
How do I actually add it to the list? I'm guessing that I need to
create a recordset object and set it to represent the TextID table, and
write the code that will add the data for the two fields to a new
record. But I'm not sure how to do that, or if that is the best
approach.
Any help would be appreciated.
whole situation out rather than explain my problem in isolation.
You should know that I'm a high school teacher who took a month long
Access class back in the Access 97 days, and have hardly used it since.
I also do some Java programming on the side, but I've only tinkered
with VB. So I have big gaps in my knowledge base, but I have been able
to write a few modules as well as use the visual tools.
I'm trying to create a database for my school to use to keep track of
textbooks, and I've been "reteaching" myself as I go, but I've run into
a hurdle that has stumped me. I have two external tables that contain
student information by semester - Sem1 and Sem2. I have a second table
StudentTexts with the StudentID* (*key field) and fields for up to
seven textbooks (one AP course uses seven different books). I also
have TextbookData (ISBN* (*key field), Publisher, Author, etc.) and
CourseData (CourseNum* (*key field) and ISBN's for each text used).
Lastly, I have a table that (eventually) will contain a list of every
textbook used at our school. Right now, its fields are ISBN (so it can
link to TextbookData) and TextID. Neither can be a key field.
Obviously, if you have 200 Algebra books, they all have the same ISBN
number, but different ID numbers. But it is likely that there are
Algebra books and English books that have the same ID number. I've
considered making separate tables for each textbook so the ID could be
the key, but that complicates other problems. If necessary, I could
create a calculated field that combines the two which could be a key.
I've got everything working except ONE thing. I have a form which
allows me to select textID's out of a combobox for each student and
each of the seven possible textbooks and put that data in the
StudentText table. Each combobox uses a query to list the TextID's for
the appropriate books. I have the combobox set to LimitToList. If
something that is NOT on the list is entered, I can intercept that data
and ask the user if they want to add it to the list.
FINALLY - here is my problem. (Thanks for waiting)
How do I actually add it to the list? I'm guessing that I need to
create a recordset object and set it to represent the TextID table, and
write the code that will add the data for the two fields to a new
record. But I'm not sure how to do that, or if that is the best
approach.
Any help would be appreciated.