PRB: Error Message with BROWSE and SET FILTER Commands in FormLast reviewed: January 10, 1997Article ID: Q156733 |
The information in this article applies to:
SYMPTOMSWhen using a SET FILTER or BROWSE FOR commands to filter and display records in a form, the following error may appear:
"Object is not contained in a form."The Debug window normally points to the BROWSE command as the line causing the error condition.
WORKAROUNDUse the following syntax to browse the desired records in the example created in the Steps to Reproduce Behavior section of this article:
x='"' + ALLTRIM(ThisForm.Text2.Value) + '"' SET FILTER TO &x $ Test.cfield1 BROWSE - or- x='"' + ALLTRIM(ThisForm.Text2.Value) + '"' BROWSE FOR &x $ Test.cfield1When you define the variable x in this example, a pair of single quotation mark characters (') enclose a double quotation mark character (").
STATUSThis behavior is by design.
MORE INFORMATIONSometimes the SET FILTER and the BROWSE FOR commands encounter difficulty resolving object references. Therefore, you need to create a memory variable to hold the object reference as a string. Then use macro substitution to place the memory variable in the command.
Steps to Reproduce Behavior
|
KBCategory: kbprg kbprb
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |