Blogroll

Get a website with Godaddy


Logo designer Fiverr Frelancer

Thursday, December 13, 2012

Construct Query into VBA using query design

Wonder how to construct proper query into VBA using query design screen? You are not required to memorize those syntax command by just applying below trick..











Sample


CurrentDb.Execute " SELECT tbl_itemledger.*, tbl_itemledger.ildate FROM tbl_itemledger
WHERE (((tbl_itemledger.ildate) Between Date()-7 And Date()));"




CurrentDb.Execute " SELECT tbl_itemledger.* FROM tbl_itemledger WHERE (((tbl_itemledger.ILuser)="alchai"));"


note: Those statements quoted with " need to be converted into ' instead as below. 
CurrentDb.Execute " SELECT tbl_itemledger.* FROM tbl_itemledger WHERE (((tbl_itemledger.ILuser)='alchai'));"


Hope it helps.....




No comments:

Post a Comment

Amazon store

alidropship plugin

alidropship plugin
alidropship plugin

Total Pageviews

About