UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Applyfilter Macro, Access 2013    
 
   
swarnamjvasudeva...
post Nov 27 2017, 10:22 PM
Post#1



Posts: 6
Joined: 25-October 17



Dear All,

I try to set a macro with applyfilter in a Report.
When I run the macro with command Button , it says "Data Type Mismatch in Criteria Expression"
Kindly help me to correct this error.

It works fine on all other fields and particular Field sorting , this doesn't work.
Go to the top of the page
 
theDBguy
post Nov 27 2017, 10:50 PM
Post#2


Access Wiki and Forums Moderator
Posts: 71,237
Joined: 19-June 07
From: SunnySandyEggo


Hi,

Welcome to UtterAccess!
welcome2UA.gif

Can you post a sample copy of your db or screen images to give us a better idea of what is happening with the report? Thanks.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Microsoft Access MVP | Access Website | Access Blog | Email
Go to the top of the page
 
HairyBob
post Nov 28 2017, 01:50 AM
Post#3



Posts: 881
Joined: 26-March 08
From: London


Have a look at the criteria expression and make sure that the data type of the right-hand side is correct - for example, the following SQL will raise a Type Mismatch when run:

CODE
SELECT NumericColName FROM TableName WHERE NumericColName = "A"


Where the data type of NumericColName in TableName is a numeric data type such as byte, integer, long, single, double, currency etc.

--------------------
If it was easy, It wouldn't be fun!
Go to the top of the page
 
GroverParkGeorge
post Nov 28 2017, 07:26 AM
Post#4


UA Admin
Posts: 31,256
Joined: 20-June 02
From: Newcastle, WA


Without seeing the actual Macro, it's really hard to guess what the problem is.

So, as theDBguy asked, show us that actual Macro.

As HairyBob says, the problem is likely to be trying use a string value where a numerical value is required, or something similar perhaps.

--------------------
Go to the top of the page
 
swarnamjvasudeva...
post Dec 3 2017, 11:09 AM
Post#5



Posts: 6
Joined: 25-October 17



Hi all,
Thanks for all your replies.
I corrected the field properties and worked well.........once again thanks....
Go to the top of the page
 
theDBguy
post Dec 3 2017, 11:33 AM
Post#6


Access Wiki and Forums Moderator
Posts: 71,237
Joined: 19-June 07
From: SunnySandyEggo


Hi,

Congratulations! Glad to hear you got it sorted out. Good luck with your project.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Microsoft Access MVP | Access Website | Access Blog | Email
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    18th December 2017 - 11:48 AM