list box referencing wrong table records

M

Mark

Hi,

I have a class-scheduling database that I need help with.
First, I have a form that employees can register for a
class (classes are initially set up by an administrator in
form, which populates a class table. The class
registration form/information populates a
table, "tableClassRegistration", which has the following
fields: ClassID, EmployeeID, EmployeeLName, EmployeeFName,
WorkPhone (in addition, the table has ClassApproved and
Comments. Next, a form, "formClassApproval", is based on
table, "tableClassRegistration", that allows an
administrator to approve/disapprove the employee
registration and add comments. So,
the "formClassApproval " has three controls/fields:
approve/disapprove (a yes/no check box), comments (a text
box that allows a memo to be added), and a third control
(a list box that is populated from a query based on
the "tableClassRegistration", which has a criteria "Is
Null" in the "ClassApproved" field that returns all
records that have not been approved/disapproved yet.

Have I lost you yet?

My problem lies in the form, "formClassApproval". The
list box returns all records that have not been
approved/disapproved yet, but when I select a record in
the list box and fill in the yes/no check box and add
comments... the information is being saved in the first
record only... not in the corresponding record selected
from the list box.

My question: how can I get the list box, listing all of
the records and fields that have not been
approved/disapproved, when after selecting any given
record from the list box and then filling in the yes/no
check box and comments... to have that information being
saved to the corresponding record? Right now, the
information is being saved to the first record in the
table.

Many thanks for your assistance!!!!
 
J

John Vinson

My question: how can I get the list box, listing all of
the records and fields that have not been
approved/disapproved, when after selecting any given
record from the list box and then filling in the yes/no
check box and comments... to have that information being
saved to the corresponding record?

You'll need to use an UNBOUND listbox, i.e. its Control Source must be
blank; and write VBA code to navigate to the selected record in the
listbox's AfterUpdate event.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top