camco
asked on
Look Up in Form
I have a form that has two sub forms. The subforms use the same table for the record source. I would like a field that you could enter text and have it find a record in one of the two subforms based on the text that you enter in the look-up field.
Thanks for the help!
Ward
Thanks for the help!
Ward
ASKER
Is the txtFilter1 in "me.txtFilter1" the name of my unbound text box that I enter the search criteria in?
ward
ward
Correct Ward.
I anticipated on possibly two separate fields, one per subform...
Nic;o)
I anticipated on possibly two separate fields, one per subform...
Nic;o)
ASKER
Hi Nic,
This is waht I have but when I click on the button I get an error meassage compile error. method or data member not found. It highlights .txt34 in yellow.
Private Sub Command37_Click()
Me.Subform1.Form.Filter = "OrderNumber like '*" & Me.txt34 & "*'"
Me.Subform1.Form.FilterOn = True
End Sub
Thanks Again!
Ward
This is waht I have but when I click on the button I get an error meassage compile error. method or data member not found. It highlights .txt34 in yellow.
Private Sub Command37_Click()
Me.Subform1.Form.Filter = "OrderNumber like '*" & Me.txt34 & "*'"
Me.Subform1.Form.FilterOn = True
End Sub
Thanks Again!
Ward
Goto the field txt34 on your form in editmode and right-click it to select the properties.
There goto the "Other" tab and check or the name is effectively "txt34".
Also check this for the OrderNumber on the subform1.
Nic;o)
There goto the "Other" tab and check or the name is effectively "txt34".
Also check this for the OrderNumber on the subform1.
Nic;o)
ASKER
They have the same name. I am stumped
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks a million!!!
Ward
Ward
You're welcome ;-)
Just try to be very secure on the names you use and prefixing/renaming fields and other objects will really pay-off !
Nic;o)
Just try to be very secure on the names you use and prefixing/renaming fields and other objects will really pay-off !
Nic;o)
The button can issue a filter command like:
me.sfrmSubform1.Form.Filte
me.sfrmSubform1.Form.Filte
Same goes for the second button.
This will search the FieldA matching your txtFilter1 value even for a part.
Is that what you need?
Nic;o)