I have a form which has 3 cascading combo boxes and a command button(spread).
What it should do is, when some one presses Spread, an sql query should dump all the data in excel. Tat is working,
But I want to sql statement where clause be based on combo box values.
sqltxt = "Select * From tnwtd Where tnwtd.SBU=" & me.combo1.value
But it keeps throwing error 3462 or missing operand error. I think the sql syntax for VBA is wrong.
Can anyone help me out..
Greatly appreciate help.
Thanks,
AG
What it should do is, when some one presses Spread, an sql query should dump all the data in excel. Tat is working,
But I want to sql statement where clause be based on combo box values.
sqltxt = "Select * From tnwtd Where tnwtd.SBU=" & me.combo1.value
But it keeps throwing error 3462 or missing operand error. I think the sql syntax for VBA is wrong.
Can anyone help me out..
Greatly appreciate help.
Thanks,
AG