Hi, I'm trying to create a databse for my company where you can access hours spent on jobs by employee.
I have the following tables set up: "employees", "jobs" and "hours".
The Last Field in [Employees] is a relationship with Hours
On the form for employees i want to list every record in HOURS that has the same name as the employee being looked at.
SO:
SELECT Hours.Employee, Hours.Job, Hours.Hours FROM Hours WHERE Hours.Employee=Nickname
Now.. this WORKS. except that when i change records it does not update the contents of the ListBox!
So i load the form, and the values listed are correct for the 1st employee that is there, but when i goto the next record, it still lists the values for thee 1st employee.
I tried to use the Form.OnCurrent event to change the listbox.RowSource value before loading the record, but I'm told that i cannot edit the properites of a control unless it has focus (not true in real VB, why here?).
anyway, any solution you have would be greatly appreciated.
thanks in advance,
Dan
I have the following tables set up: "employees", "jobs" and "hours".
The Last Field in [Employees] is a relationship with Hours
On the form for employees i want to list every record in HOURS that has the same name as the employee being looked at.
SO:
SELECT Hours.Employee, Hours.Job, Hours.Hours FROM Hours WHERE Hours.Employee=Nickname
Now.. this WORKS. except that when i change records it does not update the contents of the ListBox!
So i load the form, and the values listed are correct for the 1st employee that is there, but when i goto the next record, it still lists the values for thee 1st employee.
I tried to use the Form.OnCurrent event to change the listbox.RowSource value before loading the record, but I'm told that i cannot edit the properites of a control unless it has focus (not true in real VB, why here?).
anyway, any solution you have would be greatly appreciated.
thanks in advance,
Dan