Asked by:
An error occurred while referencing the object

Question
-
Hi all,
I have the following error "An error occurred while referencing the object" while I am starting entering a data in a sub form, before the first character appears
After clicking on OK,the system lets you continue as if nothing
I looked around on the net, it was reported from time to time, but there is no usable answer
Thanks for your help
Wednesday, November 8, 2017 9:09 PM
All replies
-
Try this:
set a break point at the first line of code that you can set a break point on (you can't set a break point on a Dim statement). Then press F8 to step through the code and see at what line of your code you get this error (for debugging -- don't use On Error GoTo .... because then you won't be able to isolate the error -- On Error GoTo.... is for when you have released the application to the users).
Once you see at what line your code fails you need to paste the code in a code block here and an arrow pointing at which line the code fails. Once it can be seen what you code looks like and at what point it is failing then a suggestion could be offered as to what the workaround might be.
Rich P
- Edited by Rich P123 Wednesday, November 8, 2017 9:19 PM .....
Wednesday, November 8, 2017 9:18 PM -
Hi Rich
I insulated the forms and table in a separate Access DB, there is not a single line of VBA, no macro, no datamacro
in an example I built 2 tables/ Parent and child with integrity relation
While opening the Parent TABLE, it is possible to create update Child without message...but While opening the Parent FORM, and adding child, the message appears!
crazy!
I reinstalled Access...no change
Wednesday, November 8, 2017 11:31 PM -
Hello,
Could you please share your database here? You could upload it to OneDrive and share the link here. Please visit Share OneDrive files and folders
Besides, what is your Office version and build number? Do you install all Office updates?
Regards,
Celeste
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.Thursday, November 9, 2017 2:37 AM -
Hi Celeste
Thanks to consider my issue,
I have Access 2016, office Pro 2016, version 1710 (build 8625.2121), updates are done
here is the link to the file
https://1drv.ms/u/s!AiqqlFVOccCChS3bntB_3h6DfKNj
you open the Frm_Parent and try to enter a child; at the very moment you type the first Character, the popup appears
Thursday, November 9, 2017 5:07 AM -
Hello,
Please change the source object of the Subform into Table.Tbl_Child instead of the Subform itself.
Regards,
Celeste
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.Thursday, November 9, 2017 5:54 AM -
Thanks Celeste for your quick answer
this is a good workaround, unfortunately, I need a sub form in order to setup hyperlinks or some events on fields
As you faced the same issue, the good information is that does not depend on Access installation
for the community.. Any clue?
Thursday, November 9, 2017 7:15 AM -
Hello,
I think it is by design. When you create the parent form using Access default settings, it would also use table as the subform's source object. I suggest you use table as its source object.
Regards,
Celeste
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
- Edited by Chenchen Li Thursday, November 9, 2017 9:38 AM
Thursday, November 9, 2017 9:20 AM