By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,390 Members | 1,626 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,390 IT Pros & Developers. It's quick & easy.

textbox not working if in the header of the form

P: 65
Hello all,

I have a query with the following code:

SELECT tblData.Name
FROM tblData
WHERE (((tblData.Talk) Like "*" & [forms]![frmtbltalksdatasearch]![text30] & "*"));


The text30 is in the header of the form and not in its detail section. Because of this the query is not running correctly. Instead of giving me the records that contains the work in text30, it gives all the record in the table tblData.

Is there a way to let the query read from the text30 when it is in the header and not in the detail?

Thanks,
Abolos
Aug 16 '07 #1
Share this Question
Share on Google+
3 Replies


puppydogbuddy
Expert 100+
P: 1,923
Hello all,

I have a query with the following code:

SELECT tblData.Name
FROM tblData
WHERE (((tblData.Talk) Like "*" & [forms]![frmtbltalksdatasearch]![text30] & "*"));


The text30 is in the header of the form and not in its detail section. Because of this the query is not running correctly. Instead of giving me the records that contains the work in text30, it gives all the record in the table tblData.

Is there a way to let the query read from the text30 when it is in the header and not in the detail?

Thanks,
Abolos
Try this:
SELECT tblData.Name
FROM tblData
WHERE & "(tblData.Talk Like ('" & Chr(34)&*&Chr(34) & [forms]![frmtbltalksdatasearch]![text30] & (Chr(34)&*&Chr(34) & "));'"
Aug 16 '07 #2

P: 65
Try this:
SELECT tblData.Name
FROM tblData
WHERE & "(tblData.Talk Like ('" & Chr(34)&*&Chr(34) & [forms]![frmtbltalksdatasearch]![text30] & (Chr(34)&*&Chr(34) & "));'"

Thank you for your suggestion, but actually it didn't work. Could you please revise it and write it back.

Thanks for your efforts,
Abolos
Aug 16 '07 #3

puppydogbuddy
Expert 100+
P: 1,923
Thank you for your suggestion, but actually it didn't work. Could you please revise it and write it back.

Thanks for your efforts,
Abolos

Abolos,
Please provide details as to what "it didn't work" means....error message? wrong output? no output? I am not in front of your computer, so I am in the dark unless you tell me what is happening at your end.
Aug 16 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.