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
if user insert the value "M2E0901" in the textbox then
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
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
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
Code:
"Select * from Query where M2A like 'M2A0901' "
Code:
"Select * from Query where M2E like 'M2E0901' "
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
Code:
SQL1 = "Select * from query where M2A like ' "& txtclass1 &" ' " DoCmd.RunSql SQL1
can anybody help me please.
thanks anyway
Comment