B
Bent
Sorry about the length, please have patience. I have
written a small database for a driving school. Containing
the tables; Instructors, Students, Appointments and
Messages. The appointments table appears as a subform in
both the Students and Instructors tables, and the messages
table is a second subform in the instructors table.
I have form for my instructors, e.g. instructor's name,
id, address, phone number, etc - with the primary key
being instructor id. And a sub-form called messages,
linked one-to-many using the instructor id, that contains
a text field for messages and a check box for the
field 'MessageDelivered'. If I want to have a button that
runs a query on the form to list all messages for each
instructor that have not been delivered (unchecked), how
do I address the form? To be a little more clear sometimes
I see joins written like (I'll use my fields) 'WHERE
((Instructors.InstructorID) = (Messages.InstructorID)); as
opposed to 'WHERE (Instructors.InstructorID) = [Forms].
[Messages].[MessagesDeleivered]'
What is the correct syntax if I want to run a query given
the information on the form in front of the user, as
opposes to just running it off a table? I.e. make the
query use the values in the current record.
My second question builds on the first I guess. Given I
have an appointments subform on both the students and
instructors forms that shows all appointments for the
currently displayed student or instructor, how would I go
about having a query that would list all the relevant
details of the student (name address etc) given the
instructors form that contains the current appointments
for that instructor. In other words, I have an instructor
selected, it shows three appointments for example, given
the time and date etc, but this does not show the students
details, so if a receptionist wants to know, just by
looking at the instructors form, the details of the
student from the currently selected appointment, how would
I go about looking this up?
I realize these are possibly both very open-ended and at
the same time quite simple questions, but I am desperate
for assistance, and I am finding this really quite fun
(maybe I'm sick?)
Here is some table info that might help - please excuse
the length, and many, many thanks
Students
StudentID - autonumber - primary key
StuFirstname
StuLastname
StuAddress
StuHPhone
StuWPhone - etc
Instructors
InstructorID - integer - primary key
InsFirstame
InsLastname
InsPhone - etc
Appointments
AppTime
AppDate
AppointmentID - autonumber
Cost
InsructorID
StudentID
Messages
MessageID - autonumber primary key
InstructorID
Message
MessageDelivered - checkbox
written a small database for a driving school. Containing
the tables; Instructors, Students, Appointments and
Messages. The appointments table appears as a subform in
both the Students and Instructors tables, and the messages
table is a second subform in the instructors table.
I have form for my instructors, e.g. instructor's name,
id, address, phone number, etc - with the primary key
being instructor id. And a sub-form called messages,
linked one-to-many using the instructor id, that contains
a text field for messages and a check box for the
field 'MessageDelivered'. If I want to have a button that
runs a query on the form to list all messages for each
instructor that have not been delivered (unchecked), how
do I address the form? To be a little more clear sometimes
I see joins written like (I'll use my fields) 'WHERE
((Instructors.InstructorID) = (Messages.InstructorID)); as
opposed to 'WHERE (Instructors.InstructorID) = [Forms].
[Messages].[MessagesDeleivered]'
What is the correct syntax if I want to run a query given
the information on the form in front of the user, as
opposes to just running it off a table? I.e. make the
query use the values in the current record.
My second question builds on the first I guess. Given I
have an appointments subform on both the students and
instructors forms that shows all appointments for the
currently displayed student or instructor, how would I go
about having a query that would list all the relevant
details of the student (name address etc) given the
instructors form that contains the current appointments
for that instructor. In other words, I have an instructor
selected, it shows three appointments for example, given
the time and date etc, but this does not show the students
details, so if a receptionist wants to know, just by
looking at the instructors form, the details of the
student from the currently selected appointment, how would
I go about looking this up?
I realize these are possibly both very open-ended and at
the same time quite simple questions, but I am desperate
for assistance, and I am finding this really quite fun
(maybe I'm sick?)
Here is some table info that might help - please excuse
the length, and many, many thanks
Students
StudentID - autonumber - primary key
StuFirstname
StuLastname
StuAddress
StuHPhone
StuWPhone - etc
Instructors
InstructorID - integer - primary key
InsFirstame
InsLastname
InsPhone - etc
Appointments
AppTime
AppDate
AppointmentID - autonumber
Cost
InsructorID
StudentID
Messages
MessageID - autonumber primary key
InstructorID
Message
MessageDelivered - checkbox