I have code like this
Dim Mon as string
Mon = Inputbox ("Month","Month")
sQL = .... & _
"Where Month = " Mon
If I enter 05 in input box, it always caputure number value and sql has error, because in the table filed "Month" is text "05".
How can i make it capture text? I tried use str() in sql but it had error...
Thanks a lot.
Edit:
I think in the sql statement the input will show 05 there, but the error still says "data type dismathc in critiria expression". In table the month column is "Text", I wonder if String is different from Text?
Dim Mon as string
Mon = Inputbox ("Month","Month")
sQL = .... & _
"Where Month = " Mon
If I enter 05 in input box, it always caputure number value and sql has error, because in the table filed "Month" is text "05".
How can i make it capture text? I tried use str() in sql but it had error...
Thanks a lot.
Edit:
I think in the sql statement the input will show 05 there, but the error still says "data type dismathc in critiria expression". In table the month column is "Text", I wonder if String is different from Text?
Last edited: