excel - Data Type Mismatch in Criteria Expression Binary to Integer VBA -
I am writing an Excel macro that works with existing access db. Many of the questions I have run, will require input from the user, which removes users from the table, but seeing that each time I capture it at the beginning of the macro and use that variable In my SQL statement the number is for a quarter number of years. So it will be either 1,2,3 or 4, I can capture that user properly, but when I try to use variables in any SQL statement, I get "data type mismatch" in the benchmark error Happens
<. dim Qrtnum integer Qrtnum = Application.InputBox ( "Enter the quarter to sample") sql1 = "SampledEmailAddressesByQuarter Delete Because, from SampledEmailAddressesByQuarter.Quarter SampledEmailAddressesByQuarter: p> Here's what I tried I am where to add a sampled e-mail addressBike Quarter.quarter = "appAccess.DoCmd.RunSQL sql1 & amp; Qrtnum is Now the data in your database table as listed in "binary" and I'm the problem in your SQL may be, to pass an Int variable try this? Or is it the fact that an int is concatenated with my SQL string?
Any help would be appreciated.
A soldier should answer a bit out of the answer, but credit should go to @HansUp. Finally I are converted into the number of data types of the field and managed to copy after all data. My code works fine now it is not trying to deal with a binary data type. Still interested in knowing how I work with it. Thanks for all the help.
Comments
Post a Comment