T
Terrence Carroll
I am looking to do a little bit more of a sophisticated look up. I have a
form with a list box (listCOFAMNAME) a text box (txtCOFAMNAME) and a command
button (cmdSEARCH). What I want to do is have the list box populate with the
Company family name and company name when the user clicks on the command
button after entering a text string into the text box. Ideally the query
would do a like "*" & CompanyFamilyName & like "*" search so that even if
there is a partial match, it would show up in the list box. I tried use the
list box wizard and modify the sql statement but it is not working. Listed
below is the SQL statement. I would like to use VBA by linking the query
action to the search button object but I am not sure how.
umulativeCOFAMNAMECONAME].[CompanyFamilyName],
[CumulativeCOFAMNAMECONAME].[Company Name] FROM CumulativeCOFAMNAMECONAME
WHERE [CumulativeCOFAMNAMECONAME].[CompanyFamilyName] Like "*" &
DATAENTRYFORM.txtCOFAMNAME ORDER BY [CompanyFamilyName], [Company Name];
form with a list box (listCOFAMNAME) a text box (txtCOFAMNAME) and a command
button (cmdSEARCH). What I want to do is have the list box populate with the
Company family name and company name when the user clicks on the command
button after entering a text string into the text box. Ideally the query
would do a like "*" & CompanyFamilyName & like "*" search so that even if
there is a partial match, it would show up in the list box. I tried use the
list box wizard and modify the sql statement but it is not working. Listed
below is the SQL statement. I would like to use VBA by linking the query
action to the search button object but I am not sure how.
umulativeCOFAMNAMECONAME].[CompanyFamilyName],
[CumulativeCOFAMNAMECONAME].[Company Name] FROM CumulativeCOFAMNAMECONAME
WHERE [CumulativeCOFAMNAMECONAME].[CompanyFamilyName] Like "*" &
DATAENTRYFORM.txtCOFAMNAME ORDER BY [CompanyFamilyName], [Company Name];