hondaman2003
Programmer
I have 2 databases. I simply want to use database 1 to open database 2. Database 2 has a startup form that has subforms. The parent form attempts to set several fields in each of the subforms to null on load to 'reset' the forms. When I open database 2 directly it will open normally. When I use database 1 to open database 2 it will give an error #2455, 'You entered an expression that has an invalid reference to the property Form/Report.'
This error brings me to the first line in my load event code the attempts to set a field to null on a subform. Again, when I open database 2 directly, there is no problem, when I open it by either of the two following options it will give the above error:
Dim appAccess As Access.Application
Set appAccess = CreateObject("Access.Application")
appAccess.OpenCurrentDatabase PathFile
OR
Application.FollowHyperlink PathFile, , True
This error brings me to the first line in my load event code the attempts to set a field to null on a subform. Again, when I open database 2 directly, there is no problem, when I open it by either of the two following options it will give the above error:
Dim appAccess As Access.Application
Set appAccess = CreateObject("Access.Application")
appAccess.OpenCurrentDatabase PathFile
OR
Application.FollowHyperlink PathFile, , True