Solved

Help with elements of a form and ADO

Posted on 2004-09-20
5
141 Views
Last Modified: 2010-05-02
Hello i have three tables (teachers, subjects, assignationofsubjects) and for each table i have create a form, i have already the form for teachers and subjects but i don't know how to do the third form for assignationofsubjects where the user select the teacher and the subject and do operations with like add, delete,....., and print all the assignation of subjects for a teacher.

Thanks for the help.
0
Comment
Question by:emont
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 2

Accepted Solution

by:
UncleMidriff earned 70 total points
ID: 12104985
I am assuming that your Assignationofsubjects table has a field for a Teacher ID and a Subject ID.

I would do the following:

Have the user select a teacher from a combobox or listbox (you should populate the combobox or listbox with this info from the database) and then allow the use to select 1 of three options: Print Assignation* of Subjects, Add Assignation, and Delete Assignation.

If the user selects Print Assignation of Subjects, you need select all the records from the Assignationofsubjects table that have the selected teacher's Teacher ID in the Teacher ID field.  Once you have all those records in a recordset or dataset, you can do whatever you want to with them: display them onscreen, use them in a report, etc.

For Delete Assignation, just like before, use the selected teacher's Teacher ID to find all the corresponding records in the Assignationofsubjects table.  Display the results in a listbox and let the user select which one(s) to delete.  Delete them from the recordset or dataset and then update the database.

For Add Assignation, let the user select a subject from a combobox or listbox, and then use the Teacher ID of the selected teacher and the Subject ID of the selected subject to create a new row in the Assignationofsubjects table, placing the selected Subject ID in the Subject ID field and the selected Teacher ID in the Teacher ID field.  Update the database with this info and now that teacher will be linked to that subject.

I am assuming that you know how to use ADO to perform the various database operations mentioned above.  What I have given is just a basic plan of action for doing what (I think) you want to do.

Just let us know if you need anything else :) .



I would use the word "Assignment."
0
 
LVL 2

Expert Comment

by:UncleMidriff
ID: 12560028
I think the info I provided should be of some help to emont, but whatever you all decide is fine with me.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question