Steven W. Erbach
serbach at new.rr.com
Thu Sep 11 16:22:25 CDT 2003
Dear Group, FWIW, I solved the problem I was having with Access XP acting differently from Access 2000. To recap: I'm using Database Creations' ezSmartSearch to add "black box" functionality to an application written in Access 2000 that will be converted to Access XP. I'm developing the code on both an A2K workstation (at my home office) and AXP (at my client's site). When I ran the ezSmartSearch form under A2K there were no problems. However when running under AXP I'd get an error 3011: "The Microsoft Jet database engine could not find the object '~sp_cezs_SmartSearch~sq_cFindSearchID'. Make sure the object exists..." The problem turned out to be related to whether the SetFocus method can be used in a Form_Open event proc. The code in the Form_Open event proc as it comes from Database Creations has these lines: .... Me!SmartSearchTabs.Style = 2 Me.SmartSearchTabs.TabFixedHeight = 0 Me.SmartSearchTabs.Pages![Smart Search].SetFocus RefreshSmartSearch .... RefreshSmartSearch is a custom method. When I debugged the code in Access XP the .SetFocus line would fire the Form_Load event proc. The Form_Load sets the RecordSource property for the form and the RowSource property for a combo box named FindSearchID. Then the code returned to the Form_Open event proc...and that's when the error would trigger, pointing to the .SetFocus line above. I finally got it through my thick skull that maybe the Form_Open event proc was not the best to put a .SetFocus method. So I moved all of the Form_Open code to the Form_Load event proc...and voila! She works! Not a big deal in the grand scheme, but this caused me to spend a lot of time trying way too many little things until I stumbled across the solution. Regards, Steve Erbach Scientific Marketing Neenah, WI