Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Runtime error 2455 after using binoculars to find

Status
Not open for further replies.

JaneC

Programmer
Jul 18, 2001
125
GB
I have a function called UpdSubs which is called by the On Current event for a form. This references a subform which is displayed on page 2 of a tab control.

Everything works fine if the user uses the record navigation buttons to move through the recordset. However, if they use the binoculars to find a specific record then UpdSubs sometimes fails with Runtime Error 2455 - You entered an expression that has an invalid reference to the property Form/Report.

If they search a field that is on the main form (but not on a page of the tab control) then it works, if they try to search a field on page one of the tab control then it gives the error.

Is is because I'm trying to reference controls on one page of a tab control when the focus is on another page ???

Any help with this would be great - I'm going mad here....

Jane
 
Hi,

I think I answered my own question!. I've added a setfocus to a control on the main form just before the "faulty" code executes and all is fine now !!

JAne
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top