HalloweenWeed
Member
- Local time
- Today, 13:56
- Joined
- Apr 8, 2020
- Messages
- 220
Hello again,
I have a split database on an institutional network, a very complicated front-end with dozens of forms that interact, many interact with each other via vba. I am using a method that implements 'live search' technique in the affected form. The problem is, as soon as I click on the (only) subform, I get:
This is really odd to me, as this was the name of a hidden form that I renamed nearly a year ago, and since then I have rebuilt the db FE 'from scratch' so-to-speak, importing only the tables and 6 reports. All the rest was recreated by:
1. copying the SQL from the original FE in queries, and pasting the SQL into each of the fresh new queries.
2. Rebuilding each form from the 'create new form', setting all the form properties, and then copying all the objects from each panel (header, detail, etc.) and pasting them into the fresh new forms.
3. Copying and pasting each module vba from the original to the new FE modules.
I have done a vba search of the (only) entire vba project for:
Security_Current_User_Name
Security_
_Current_
and it finds nothing.
And then I subsequently get "Error #2465: Application-defined or object-defined error."
I have searched the SQL in each of the queries including source queries related to the form and subform throwing the error, and they don't contain "Security_Current_User_Name". The SQL that I originally pasted didn't either.
Said form Security_Current_User_Name was only in the FE, never in the BE. db is only split into two, FE & BE.
The parent form is unbound. The subform is bound to "qry_RspndrSuffixSelect". The parent form does a requery of the subform when the only visible field on said parent form is changed, both "on key up" (it transfers the "Text" value to a hidden textbox that is used in the query for the subform), and "After Update".
The form Security_Current_User_Name was originally referenced in some macros within form events, to check for permission to view the data within. All these have been converted to vba, and since then the forms rebuilt from scratch, so I don't see how any old db FE reference data to form Security_Current_User_Name could have gotten into the new db. No form controls, or even forms themselves, were ever bound to that form either.
I have checked the db FE relationships, it is not there either.
I compose vba with auto-compile off, then compile, then save. All compiles without error.
More clues: the error only comes up when I click on the subform, on a different record; i.e. if I click a second time on the same record it does not do it. This makes me refer to the subform "current" event, which was empty, so I tried putting in a macro to "requery," saved the subform, removed the macro, saved it again, no joy. Each record contains only two non-editable controls, textboxes, and one "Choose" button. The "Choose" button is only tied to one event: OnClick - vba. When I try to click on the button, with a breakpoint on the first line of executable code in the procedure, the error comes up before the break, so it must be something tied to form events such as "current" or a focus event. The parent form only has events on Load and Open. The subform uses no events whatsoever, and it's textboxes are bound and locked. It doesn't matter where on the subform record line I click, behaves the same way. The parent form control textbox that is losing the focus has an after update and on key up events, both vba. I've checked the vba for anything that could throw said error and am stumped.
Any ideas are desperately wanted and appreciated.
I have a split database on an institutional network, a very complicated front-end with dozens of forms that interact, many interact with each other via vba. I am using a method that implements 'live search' technique in the affected form. The problem is, as soon as I click on the (only) subform, I get:
Code:
Microsoft Access cannot find the referenced form 'Security_Current_User_Name'.
* The from you reverenced may be closed or may not exist in this database.* Microsoft Access may have encountered a compile error in a Visual Basic module for the form.
1. copying the SQL from the original FE in queries, and pasting the SQL into each of the fresh new queries.
2. Rebuilding each form from the 'create new form', setting all the form properties, and then copying all the objects from each panel (header, detail, etc.) and pasting them into the fresh new forms.
3. Copying and pasting each module vba from the original to the new FE modules.
I have done a vba search of the (only) entire vba project for:
Security_Current_User_Name
Security_
_Current_
and it finds nothing.
And then I subsequently get "Error #2465: Application-defined or object-defined error."
I have searched the SQL in each of the queries including source queries related to the form and subform throwing the error, and they don't contain "Security_Current_User_Name". The SQL that I originally pasted didn't either.
Said form Security_Current_User_Name was only in the FE, never in the BE. db is only split into two, FE & BE.
The parent form is unbound. The subform is bound to "qry_RspndrSuffixSelect". The parent form does a requery of the subform when the only visible field on said parent form is changed, both "on key up" (it transfers the "Text" value to a hidden textbox that is used in the query for the subform), and "After Update".
The form Security_Current_User_Name was originally referenced in some macros within form events, to check for permission to view the data within. All these have been converted to vba, and since then the forms rebuilt from scratch, so I don't see how any old db FE reference data to form Security_Current_User_Name could have gotten into the new db. No form controls, or even forms themselves, were ever bound to that form either.
I have checked the db FE relationships, it is not there either.
I compose vba with auto-compile off, then compile, then save. All compiles without error.
More clues: the error only comes up when I click on the subform, on a different record; i.e. if I click a second time on the same record it does not do it. This makes me refer to the subform "current" event, which was empty, so I tried putting in a macro to "requery," saved the subform, removed the macro, saved it again, no joy. Each record contains only two non-editable controls, textboxes, and one "Choose" button. The "Choose" button is only tied to one event: OnClick - vba. When I try to click on the button, with a breakpoint on the first line of executable code in the procedure, the error comes up before the break, so it must be something tied to form events such as "current" or a focus event. The parent form only has events on Load and Open. The subform uses no events whatsoever, and it's textboxes are bound and locked. It doesn't matter where on the subform record line I click, behaves the same way. The parent form control textbox that is losing the focus has an after update and on key up events, both vba. I've checked the vba for anything that could throw said error and am stumped.
Any ideas are desperately wanted and appreciated.
Last edited: