Re: Code not working correctly
- From: kateri4482 <kateri4482@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 31 Dec 2008 16:35:01 -0800
Oops, I thought your reply was the reason it wasn't working and I answered
and implied that all was OK. However, I deleted the "Date" field I had but
now when I run this, it says it cannot find the Date field I specify. Aargh!
It has been a few days since I last accessed this post, so if it is too late
for you to see this and reply, I will create a new one in a few days.
Thanks again.
"Marshall Barton" wrote:
kateri4482 wrote:.
I have the following code running from a command button, and it ignores the
section after the "&" sign in the strTableName statement, so it just gives me
a Table called tblBackupEnhancedCodes without the date. I can't figure out
what I am doing wrong. I want to run this periodically and create a backup
of a table but add the current date to the end of it.
Dim strTableName As String, strSQL As String
strTableName = "tblBaclupEnhancedCodes" & Format(Date, "ddmmmmyy")
strSQL = "Select tblEnhancedCodes.* Into " & strTableName & " From
tblEnhancedCodes;"
You probably have a text box named Date and its value is
Null.
If so, it's just another reminder not to use reserved words
when you make up names.
--
Marsh
MVP [MS Access]
- Follow-Ups:
- Re: Code not working correctly
- From: Marshall Barton
- Re: Code not working correctly
- Prev by Date: Trying to fill a form/table importing emails from outlook
- Next by Date: Re: >> currentDb access.application
- Previous by thread: Trying to fill a form/table importing emails from outlook
- Next by thread: Re: Code not working correctly
- Index(es):
Relevant Pages
|