I am getting data type mismatch in criteria error in this code..
please help
![]()
Please Login or Register to view this content.
I am getting data type mismatch in criteria error in this code..
please help
![]()
Please Login or Register to view this content.
Last edited by pike; 04-06-2011 at 06:07 AM.
It may help others to help you if you uploaded a sample workbook with some typical data and the code in context.
You don't say where the error occurs and it cannot be tested without the data and structure of the worksbook/sheets.
That said,
![]()
Please Login or Register to view this content.
only Dim's decilechoice As String; the other variables are type variant. You need to specify each variable individually (although it does not need individual Dim statements)
Regards
Trevor Shuttleworth - Retired Excel/VBA Consultant
I dream of a better world where chickens can cross the road without having their motives questioned
'Being unapologetic means never having to say you're sorry' John Cooper Clarke
the error is obtained while performing this step
check the paste sql subroutine below![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
Last edited by kishen1912; 04-06-2011 at 06:09 AM.
i am getting the error at this section
![]()
Please Login or Register to view this content.
Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
PLEASE PM WHEN YOU HAVE DONE THIS AND I WILL DELETE THIS POST
@kishen1912: please follow Pike's instructions or you will not get any assistance.
A suitable titke might be "Data mismatch in ADODB Connection"
Also note that, although you have provided more code, there is nothing to test it with. Please post a workbook.
I, for one, will not try to generate test data in order to find a fault in your code.
Regards
Hi kishen1912
Or even Query data type mismatch in criteria error would help other search for a similar problem
I change it
Thanks for taking the time to comply with the rule.
hi, kishen1912, your SQL string is wrong, when you use IN you can follow it either by sub select statement or data array separated by coma
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks