I want to create a table that will use todays date in the format of "tblmmm_yy" as the table name here is what i have. Im sure this is an easy fix but i just can't seem to get it.
Dim strTablename As String
strTablename = Format(Date, "mmm_yy")
DoCmd.SetWarnings False
DoCmd.RunSQL "SELECT CenterNumber,DtReceived,TranDate,HeaderSubTotal,HeaderTax," & _
"CustFName,CustLName,Identifier,DisplayName,CACPrefixID,DetailID,SortField," & _
"Qty,UnitCost,SubTotal,ProfitCenter,State,PostalCode INTO tbl & strTablename" & _
"FROM dbo_camsWeekly WHERE (((Format(dbo_camsWeekly!DtReceived,'mm/yy'))=Format(Date(),'mm/yy')));"
Thanks,
snam1aa
Dim strTablename As String
strTablename = Format(Date, "mmm_yy")
DoCmd.SetWarnings False
DoCmd.RunSQL "SELECT CenterNumber,DtReceived,TranDate,HeaderSubTotal,HeaderTax," & _
"CustFName,CustLName,Identifier,DisplayName,CACPrefixID,DetailID,SortField," & _
"Qty,UnitCost,SubTotal,ProfitCenter,State,PostalCode INTO tbl & strTablename" & _
"FROM dbo_camsWeekly WHERE (((Format(dbo_camsWeekly!DtReceived,'mm/yy'))=Format(Date(),'mm/yy')));"
Thanks,
snam1aa