Appending a table from a form

Joined
Feb 19, 2006
Messages
2
Reaction score
0
Help Please? How do you append a table from a form text box?

Hi can anyone help,
I've been bashing my head against this problem for days.
I am making a Courses Db. I have three tables Clients: [ClientID],[FirstName], SecondName] [Etc..] CourseRegistration: [RegID], [ClientID] [RegDate] and Courses: [CourseID], [RegID] [CourseName] [AvailablePlaces]. I have created a Form that contains fields from all three tables and enables a client to register for a particular course. They select the course they want via a combo box which then lists the details of the type and course dates on the form. This all works fine when you press 'AddRecord'

There is also a field called "AvailablePlaces" from the courses table on the Form.
What I would like to do is when the user hits AddRecord, the new Registration record is added and the AvailablePlaces field in the Courses table is decremented by 1. I've tried writing an Append query that is run when the OnClick is run for the AddRecord button but it asks me for a parameter value. I don't want to type in the parameter value I want it to take the value from the form. I am trying to get it to compare the CourseID on the Form with the CourseID in the table and if they are equal then reduce the AvailablePlace field by one. Any help would be very welcome.
 
Last edited:
Back
Top