Please help with form

steven low

Registered User.
Local time
Today, 03:20
Joined
Dec 2, 2006
Messages
27
Hi there

I am creating a form with a combined three tables to do a booking course form for a customer.

I have created a form for adding a customer and his course.

I have to do the following but I am not sure how I do this, all I know is that I would need to use a dloopup but not sure how, these include

. confirm if the place is available on the course
• confirm how many places are available on the course selected
• show if the customer has already booked a place on the course


Theres are 5 courses, each one allows 20 students, can someone show me a example of how to do this please, really need sum help, would appriciate it very much :confused::(
 
It does not appear that we would have enough information to really help you much at this point. Are there any dates involved with the bookings? How are the records structured? How are the tables linked? These are important to how the information you seek will be made available and accessible.
 
I have three tables

Course table
CourseID
Day
Time
Price
Trainer

Customer Table

CustomerID
Title
Firstname
Surname
Address
Town
PostCode
Telnumber


Booking Table
BookingID
CustomerID
CourseID

The booking is the main table which is the relation with the the other two tables:o
 
Steven,

Take a look at the attached database file.

I have put together this demo with a form to show how I would manage the list of courses. I have added a couple of additional tables and I have created a form to show how I would manage the booking of customers and courses.
 
Last edited:
Hi Mr B

I have made somthing similer to what you have done, but using text boxes.

I need to implment if

. confirm if the place is available on the course
• confirm how many places are available on the course selected


How would you do that on your design?
 
The whole idea about doing what i did with with the middle list box on the form where you link customers with the course is that all you have to do in your code is to check the list count of the list box to determine if there are any available spaces on the selected course, like:

if me.NameOfListBox.listcount < 20 then
'do what ever you need to do here like make the button to add
'another customer enabled.
endif

Take a look at the code in the After Update event of the "lstCustomersNotBooked" list box. It has this type of "IF" statement and manages the "cmdBookCustToClass" command button.
 
Okey MR B

What I will do is complete my version today. I am using text boxes and comand boxes mostly to add a customer and booking.

I will finish the database and try and implement the code on mine.:o
 

Users who are viewing this thread

Back
Top Bottom