C
Caldie
Guest
basic problem (i hope)
i am building a search function for a database, I am trying to use a text box on a form to set the search text, which then opens then result in a subform. I can get this working when i open the results as a regular form, like so
but when i open it as a subform like this:
i cant work out how to apply the filter to show only the fields that match the search text..
I am trying to get around this by using a query for the subform, but i cant work out how to grab whatever is in the searchtext text box on the main form, and insert it in the query to give me the right results..
a solution to either problem would be greatly appreciated, thanks for the help
i am building a search function for a database, I am trying to use a text box on a form to set the search text, which then opens then result in a subform. I can get this working when i open the results as a regular form, like so
stLinkCriteria = "[Name]" & "LIKE" & "'" & "*" & Me![SearchText] & "*" & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
but when i open it as a subform like this:
ChildFrm.SourceObject = "FrmAlbumSearch"
i cant work out how to apply the filter to show only the fields that match the search text..
I am trying to get around this by using a query for the subform, but i cant work out how to grab whatever is in the searchtext text box on the main form, and insert it in the query to give me the right results..
a solution to either problem would be greatly appreciated, thanks for the help