Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Mar 2004
    Location
    Mechanicsville, Virginia, USA
    Posts
    130
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Need help with a Query (Access 97)

    Morning!!

    I would like to know if there is a way to pull out the date information from FileID, in "qryReceived", and put that date into another column in the same query.

    Thanks
    Attached Files Attached Files

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

    Re: Need help with a Query (Access 97)

    Yopu could create a calculated column:

    TheDate: CDate(Mid([FileID],45,6))
    or
    TheDate: DateValue(Mid([FileID],45,6))

    The File column can also be created using the following expression:

    File: Mid([FileID],58,5)

    Note: the FileID field in tblReceived looks as if the table is derived from a fixed-width text file. You can use File | Get External Data | Import... to import a text file and specify how to divide the lines of the text file into columns. That is much easier than extracting information later on.

  3. #3
    2 Star Lounger
    Join Date
    Mar 2004
    Location
    Mechanicsville, Virginia, USA
    Posts
    130
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Need help with a Query (Access 97)

    Thanks so much.

    I am trying to find an example of this in an Access book. I do see some information on the TransferText, but am not quite sure what to use for the SpecificationName.

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

    Re: Need help with a Query (Access 97)

    First, import the file "manually" by selecting File | Get External Data | Import...When you have specified the field breaks, field names, field types etc.., and have arrived at the last step of the Import Text Wizard, click Advanced... You will see an overview of the settings. Click Save As.... to save these settings as an import specification; you can accept the name proposed by Access or replace it by a name of your choice. You can use the name of the specification later, when you want to import the table programmatically, using DoCmd.TransferText.

Posting Permissions

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