G
Guest
I have two forms, an employee form and a test date subform.
I want to delete a test date in the subform, however, there is a link to the
test record in the employee form.
What I've tried so far is to clear the link the employee form. However, I'm
still prevented from deleting the test date record since the parent record is
not updated.
If Parent.LastTest = DLookup("TestID", "Test", "employeeID=" &
Parent.EmployeeID & _
" And LocationID=" & ctrl.Tag) Then
Parent.LastTest = Null
That part works, the field is cleared. However, the delete will not work
because record is not updated.
So, I tried the add the following:
Parent.update
However, I get the message: Run time error '2465'. Application defined or
object defined error.
So, I tried to be tricky and instead use the following:
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
However, Access was not having it, and gave me the message:
Run time error '2046': The command or action 'SaveRecord' isn't available
now.
Does anyone have a work around? Thanks.
I want to delete a test date in the subform, however, there is a link to the
test record in the employee form.
What I've tried so far is to clear the link the employee form. However, I'm
still prevented from deleting the test date record since the parent record is
not updated.
If Parent.LastTest = DLookup("TestID", "Test", "employeeID=" &
Parent.EmployeeID & _
" And LocationID=" & ctrl.Tag) Then
Parent.LastTest = Null
That part works, the field is cleared. However, the delete will not work
because record is not updated.
So, I tried the add the following:
Parent.update
However, I get the message: Run time error '2465'. Application defined or
object defined error.
So, I tried to be tricky and instead use the following:
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
However, Access was not having it, and gave me the message:
Run time error '2046': The command or action 'SaveRecord' isn't available
now.
Does anyone have a work around? Thanks.