A family of Microsoft relational database management systems designed for ease of use.
Can anyone help on this topic or is it a non-starter?
Please
Tim
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have a form that I have created that provides a search function using a Search Button Macro. The following is the ApplyFilter Where Condition.
[CAGE CODE] Like "*" & [Forms]![CAGE SEARCH]![Text9] & "*" Or [VENDOR] Like "*" & [Forms]![CAGE SEARCH]![Text9] & "*"
The form called CAGE SEARCH works great and has no problems. However I tried to drag it to a tab of a Navigation Form and it no longer works and I get the following error:
"The Action or method is invalid because the form or report isnt bound to a table or query."
All of the other forms that I dragged into the Navigation Form work perfectly.
When I open the form properties the RecordSource property is pointing to the correct query as it does in the form when it is stand alone from the Navigation Form.
I have tried tweaking the macro with a select and open function but it opens the CAGECODE Query instead of searching for it and populating my form.
Thoughts....What makes the forms search function tied to a Navigation form different than a stand alone copy of the identical form?
Thanks
Tim
A family of Microsoft relational database management systems designed for ease of use.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Can anyone help on this topic or is it a non-starter?
Please
Tim
I never have occasion to use the built in 'navigation form' facility, but I think I'm right in saying that any form within a navigation form is a subform. A subform is not a member of the Forms collection, which includes only open parent forms, so cannot be referenced as such. With a normal subform a control in a subform is referenced via the Form property of the subform control in the parent form, using the following syntax:
Forms!<parent form name>!<subform control name>.Form!<control name>
The subform control name is the name of the control in the parent form's Controls collection which 'houses' the subform. It might or might not be the same as its source form object.
I imagine the syntax is the same in the case of a form in a navigation form, but can't be absolutely sure about this as it's outside my experience.
PS: If the code is being executed within the form's module you could of course reference the control as Me.Text9. The Me keyword returns a reference to the current instance of the class in which the code is running, so should work whether the form is opened as a parent form or a subform.