using Like in query

F

Fuzuy

This is additional question from my post earlier:
I'm trying to use combo1 from existing open Form into query builder
as criteria for row source of a listbox in another open Form using
"Like" to find all title_description has keyword found in combo1


Thanks to Douglas J. Steele gives me a correct syntax for

SELECT dshet_apr.Number, dshet_apr.Title_Description
FROM dshet_apr INNER JOIN datasheet_d ON dshet_apr.Number =
datasheet_d.Number
WHERE (((dshet_apr.Title_Description) Like "* " &[Forms]![frmm]!
[combo1] &
"*") AND ((datasheet_d.Dis)=[Forms]![frmm]![combo46]));

now there is no syntax error, but in datasheet view it is giving whole
title -descrption without filtering by criteria [Forms]![frmm]!
[combo1] in Like Clause. What would be a correct way to do it.

Thanks
 
F

Fuzuy

This is additional question from my post earlier:
I'm trying to use combo1  from existing open Form into  query builder
as criteria for row source of a listbox in another open Form using
"Like" to find all title_description has keyword found in combo1

Thanks to Douglas J. Steele gives me a correct syntax for

SELECT dshet_apr.Number, dshet_apr.Title_Description
FROM dshet_apr INNER JOIN datasheet_d ON dshet_apr.Number =
datasheet_d.Number
WHERE (((dshet_apr.Title_Description) Like "* " &[Forms]![frmm]!
[combo1] &
"*") AND ((datasheet_d.Dis)=[Forms]![frmm]![combo46]));

now there is no syntax error, but in datasheet view it is giving whole
title -descrption without filtering  by criteria [Forms]![frmm]!
[combo1] in Like Clause. What would be a correct way to do it.

Thanks

I would like to recall above posting message, I found a typo on combo
name it should be combo7 not combo1. so actually it is working!

Thanks for your attentions !
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top