Hi,
This will be considered as a string sql. It will be
read incorrectly as
select * from Pay(month(now)) and not as
select * from PayMay
For this you will have to have sql framed as
sql= "select * from Pay'" & (month(now))
OR
Dim PayMonth as string
PayMonth="Pay" & (month(now))
sql= "select * from " & PayMonth
This will work.
--- peijanelaw <[EMAIL PROTECTED]> wrote:
> dear sir,
>
> how to change the 'month' automatically base on
> current month after
> the 'from' in sql statement? eg. i have Jan-Dec
> table in MS
> Access..so now is May, so the data will be
> automatically stored
> in 'PayMay' table, then next month June,again data
> will auto store in
> June table....i have tried the following but failed,
> please
> help,thanks...
>
> sql="select * from Pay(month(now))"
>
>
>
__________________________________
Do you Yahoo!?
Yahoo! Domains � Claim yours for only $14.70/year
http://smallbusiness.promotions.yahoo.com/offer
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/saFolB/TM
---------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/