Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Feb 2010
    Location
    Denver, CO
    Posts
    191
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Concatenation problem (Access 2002)

    Hey gang!

    Having some difficulty getting a concatenation to work properly. I'd really appreciate someone's help.

    In the attached gif, you will find some code, screenshoot of an access table and an error message. I'm trying to create a filename (complete with path) from data found in the table. I'm using DLookup to capture the information out of the table. I've trying playing with the placement of quotemarks, etc, but Access doesn't seem to be concatenating it. I'm sure I just have a misplaced quotemark somewhere.
    Attached Images Attached Images

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Concatenation problem (Access 2002)

    You have put an expression in the FileName field in the table. The DLookup to fill strFileName will retrieve the literal text of the expression, it won't evaluate it. I suggest just putting FolderSize_ in the FileName field, and to use this:

    strFileName = DLookup("FileName", "tblConfig", "UseThisConfig = True") & Format(Date, "yyyymmdd") & ".xls"

    By moving the variable part to the code itself, you allow Access to evaluate it.

  3. #3
    2 Star Lounger
    Join Date
    Feb 2010
    Location
    Denver, CO
    Posts
    191
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Concatenation problem (Access 2002)

    Great sugguestion, Hans. Works like a charm.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •