I have been trying to invoke a routine within the subform of a form, to no avail.
The routine I'm trying to call will do a search within the records of the subform's table, but when the routine is started, it fails to work the same as when it's called by a command button within the subform itself.
It's become obvious that it works differently when called from code from within the main form vs. by a control method when invoked by a control within the subform.
The routine within the subform in question is simple: set the focus ("desiredField.SetFocus") on the desired field, and do a search ("DoCmd.Findrecord desiredValueVar") for a particular value within that field.
So when I hit the button on the subform that invokes the said routine, all is good. However, when I enter the value in the combobox on the main form that then invokes that same subform routine, the routine starts, but it fails to find that exact same value within the subform that worked when called from within the subform.
Any thoughts and/or suggestions? Thanks in advance.
The routine I'm trying to call will do a search within the records of the subform's table, but when the routine is started, it fails to work the same as when it's called by a command button within the subform itself.
It's become obvious that it works differently when called from code from within the main form vs. by a control method when invoked by a control within the subform.
The routine within the subform in question is simple: set the focus ("desiredField.SetFocus") on the desired field, and do a search ("DoCmd.Findrecord desiredValueVar") for a particular value within that field.
So when I hit the button on the subform that invokes the said routine, all is good. However, when I enter the value in the combobox on the main form that then invokes that same subform routine, the routine starts, but it fails to find that exact same value within the subform that worked when called from within the subform.
Any thoughts and/or suggestions? Thanks in advance.