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

Acc 2000 Like Operator Problem

MindBender77
100+
P: 234
Hello All,
I've always had problems with the "like" operator in a query especially using the wildcard "*". This is my latest issue. I have a query that produces 4 fields if the Line Tech field is like that entered in a textbox on a form. This is what I have so far.

Expand|Select|Wrap|Line Numbers
  1. SELECT tbl_security.[Full Name], tbl_PunchCard_Main.[LogIn Date], tbl_PunchCard_Main.[LogIn Time], tbl_PunchCard_Main.[LogOut Date], tbl_PunchCard_Main.[LogOut Time]
  2. FROM tbl_PunchCard_Main INNER JOIN tbl_security ON tbl_PunchCard_Main.[Line Tech] = tbl_security.[User Name]
  3. WHERE (((tbl_PunchCard_Main.[Line Tech]) Like "*[Forms]![frm_Search]![txt_tech]*"));
  4.  
I know (((tbl_PunchCard_Main.[Line Tech]) Like "*[Forms]![frm_Search]![txt_tech]*")) is the problem but, I can't find the correct syntax.

Thanks in Advance,
Bender
Mar 11 '08 #1
Share this Question
Share on Google+
1 Reply


MindBender77
100+
P: 234
Problem Solved:

Expand|Select|Wrap|Line Numbers
  1. SELECT tbl_security.[Full Name], tbl_PunchCard_Main.[LogIn Date], tbl_PunchCard_Main.[LogIn Time], tbl_PunchCard_Main.[LogOut Date], tbl_PunchCard_Main.[LogOut Time]
  2. FROM tbl_PunchCard_Main INNER JOIN tbl_security ON tbl_PunchCard_Main.[Line Tech] = tbl_security.[User Name]
  3. WHERE (((tbl_PunchCard_Main.[Line Tech]) Like "*" & [Forms]![frm_Search]![txt_tech] & "*"));
  4.  
Bender
Mar 11 '08 #2

Post your reply

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