Results 1 to 5 of 5
  1. #1
    Star Lounger
    Join Date
    Feb 2001
    Location
    New Zealand
    Posts
    63
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Batch Code & Swap (Office XP)

    Hi, I need to send a .txt file off to be processed which has a number of constraints. There can be a variable number of records in the file (its a table updated by appending data from another table). There are three fields I have a problem with.

    Firstly, Batch Code - needs to contain a unique number ( max 32 characters) that is the same for every record in the table. Currently I am using an update query to enter these after the table has been populated with new data. I am generating the number by using sequential numbers listed in a notebook - not very high tech I'm afraid!

    Secondly - Line number - this must always start at 1 and finish at whatever line (i.e row) there is a record for. I am entering these manuallly at present

    Thirdly expiry date - we are entering the expiry date (of a credit card) as MMYY i.e 0204 (Feb 2004), we need to reverse this in the file that is being sent so it is 0402 i.e 2004 Feb

    I would really appreciate some help on this.

    Thanks....Peter

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Batch Code & Swap (Office XP)

    What is the structure of your table?
    For the batch number you can use an update query to SET the batch number.
    You can use an Autonumber field for the LineNumber field. I presume that you will be deleting all the records in this file and doing a compact to reinitialise the autonumber field.
    What data type is the Expiry date field?

  3. #3
    Star Lounger
    Join Date
    Feb 2001
    Location
    New Zealand
    Posts
    63
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Batch Code & Swap (Office XP)

    Hi, Structure is:
    card number (number)
    card type (text)
    amount (number)
    name on card (text)
    batch code (text)
    line number (number
    expiry (text)

    I am not sure what you mean by "set", is this something I can do in an update query? with some sort of increment eg previous batch number +1?. Also, by compact do yuo mean compact the whole database or just the table?

    Thanks....Peter

  4. #4
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Batch Code & Swap (Office XP)

    I will send you an example of what you are trying to do. If you have any questions after that please post.
    Attached Files Attached Files

  5. #5
    Star Lounger
    Join Date
    Feb 2001
    Location
    New Zealand
    Posts
    63
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Batch Code & Swap (Office XP)

    Thanks very much. Regards.....Peter

Posting Permissions

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