Hai, need a help please.
i have a form to view the query subform
1. form name : form1
2. query subform name : subform1
3. textbox name : txtclass1
4. command button name : cmd1
i want to view my query based on the value in the textbox.
the field in my query are : noreg, class, M2A, M2E, M2M
if user insert the value "M2A0901" in the textbox then
- "Select * from Query where M2A like 'M2A0901' "
if user insert the value "M2E0901" in the textbox then
- "Select * from Query where M2E like 'M2E0901' "
and so on.
how do i have to use the runSQL statement. or maybe there is another way to view my data in the subform.
beside i already try this way for the M2A class
- SQL1 = "Select * from query where M2A like ' "& txtclass1 &" ' "
-
-
DoCmd.RunSql SQL1
but when i running this statement there is still error said "syntax error in query, incomplete query caluse"
can anybody help me please.
thanks anyway