Thanks for the reply Crystal,
the solution you offered will filter the list down to only showing the
selected record, there may be several that need to be listed.
below is what i have so far...
Main form
main menu - unbound
Sub form - datasheet view
employees at work - lists all employees at work using check box from
employees table that is updated when they log in.
forms![main menu]![employees at work].Requery after login.
Sub form - datasheet view
special employees - shows a list of employees with special tasks (fire warden,
first aid officer). this sub form is filtered to only show employees at work
and with special tasks
below is the code i have for this sub form, if I use the mouse to select a
different record the employees at work sub form follows the special employees
sub form and displays the correct record
IF on the other hand i use the arrow keys to select a different record i get
a debug error that stops at the line DoCmd.FindRecord Listed_employee,
acEntire, False, , False, acAll, True
error message returned is - There is no field named 'ID' in the current
record.
I can only asume that this is caused by the action of selecting the record
with the kayboard changing the focus.
I am confused as to why this is different. ( I am using keypreview to stop
Alt & Ctl commands) maybe this is cauing it.
Private Sub Form_Current()
Listed_employee = Forms![main menu]![special employees]![Employee]
DoCmd.GoToControl "[employees at work]"
DoCmd.GoToControl "[ID]"
DoCmd.FindRecord Listed_employee, acEntire, False, , False, acAll, True
End Sub