NearImpossible
Registered User.
- Local time
- Yesterday, 21:27
- Joined
- Jul 12, 2019
- Messages
- 225
Wondering if someone can point out the obvious as I seem to be missing it more and more lately.
I would like to use the same form for entering notes, however, depending on underlying form that it is launched from, the Record Source could be different.
I am using a double click event to launch the form with the following code
However I am getting Run-Time error 2465: Application-defined or object-defined error and it highlights on the following
If I mouse over dbo_FacilityEquipmentNotes it shows dbo_FacilityEquipmentNotes=empty, which is not the case and if I just specify dbo_FacilityEquipmentNotes as the source on the form properties, it works just fine
I would like to use the same form for entering notes, however, depending on underlying form that it is launched from, the Record Source could be different.
I am using a double click event to launch the form with the following code
Code:
Private Sub Equipment_DblClick(Cancel As Integer)
DoCmd.OpenForm "FacilityEquipmentNotes", acDesign, WindowMode:=acHidden
Forms!FacilityEquipmentNotes.SourceObject = "dbo_FacilityEquipmentNotes"
DoCmd.Close acForm, "FacilityEquipmentNotes", acSaveYes
DoCmd.OpenForm "FacilityEquipmentNotes", , , "[EquipmentID]= " & Me.[EquipmentID]
End Sub
However I am getting Run-Time error 2465: Application-defined or object-defined error and it highlights on the following
Code:
Forms!FacilityEquipmentNotes.SourceObject = "dbo_FacilityEquipmentNotes"
If I mouse over dbo_FacilityEquipmentNotes it shows dbo_FacilityEquipmentNotes=empty, which is not the case and if I just specify dbo_FacilityEquipmentNotes as the source on the form properties, it works just fine
Last edited: