Re: Code not working correctly

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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]

.



Relevant Pages

  • Re: Smtp bug
    ... Oops - sorry! ... For some reason, I kept reading it as if it said [string equal]. ...
    (comp.lang.tcl)
  • Re: Controlling Javascript from server side
    ... but five different language implementations here. ... 'true' means that the request must be handled asynchronously. ... There is exactly *no* reason for such a thing here. ... | percent-endoded string). ...
    (comp.lang.javascript)
  • Re: Is that a good design?
    ... I would have been able to reason the first gotcha. ... public string FirstName; ... has a reference architecture that shows the use of patterns. ... Public Shared Function GetUserInstance() As User ...
    (microsoft.public.dotnet.framework)
  • Re: packagemaker script assistance needed.
    ... Is there a reason you're conditionalizing the whole block instead of one ... string will do as you want.) ...
    (comp.sys.mac.programmer.help)
  • Re: Allow Zero Length String Property - 2000 vs 2003
    ... Well, if that was the reason, I believe my second point still stands - ... Web Interfaces do empty strings. ... > "Brendan Reynolds" <brenreyn at indigo dot ie> wrote in message ... >> Are you the same person who posted the 'Allow Zero Length String in MS ...
    (microsoft.public.access.tablesdbdesign)