alvingenius
IT Specialist
- Local time
- Today, 21:43
- Joined
- Jul 10, 2016
- Messages
- 169
Hello
I wanna change a record source of a form using VBA.
Form Record source is SQL statement
For a specific reason, I've to use this Like Operator
I believe I can't use the same statement of the like operator in VBA with same ""or *
so how to make this code work in VBA
Thanks.
Edit 1:
Fix in this post
Thanks all
I wanna change a record source of a form using VBA.
Form Record source is SQL statement
SQL:
SELECT tbl_Names.ALC_ID, tbl_Names.ALC_Number, tbl_Names.OrderID, tbl_Names.Cat1 FROM tbl_Names WHERE (((tbl_Names.ALC_Number)=[Forms]![frm_Intro]![cboSession]) AND ((tbl_Names.Cat1) Like "*" & [Forms]![frm_Names]![FilterCat1] & "*")) ORDER BY tbl_Names.OrderID, tbl_Names.Cat1;
For a specific reason, I've to use this Like Operator
I believe I can't use the same statement of the like operator in VBA with same ""or *
SQL:
Like "*" & [Forms]![frm_Names]![FilterCat1] & "*"
so how to make this code work in VBA
Thanks.
Edit 1:
Fix in this post
Thanks all
Last edited: