Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2004
    Posts
    90

    Unanswered: how fieldname can be increase by one no?

    hello,

    I have one field name that need to increase (by plus 1 with existing number) after one command button clicked.the result is when I click cmd button, the field name will plus one with existing number...any suggestion?

  2. #2
    Join Date
    Nov 2003
    Location
    Sussex, England
    Posts
    404
    Sorry can I just check this is the name of hte field you want to increase not the value held i the field?

    It's doable, just, You'd have to close the contavt with the table, and use code to perform an ALTER TABLE command. Where it gets messy is if you want to keep the data that's in the field. Access doesn't permit the simple changing of a filed name with the data in it (or it didn't up '97) and you have to add a new field, delete the old one and somehow copy the data from one to the other. Very messy. Avoid it if you can!

  3. #3
    Join Date
    Nov 2004
    Posts
    90
    Hello Ryker,

    attached here is the sample of what I need. If that table need to restucture please give an idea...

    I have 2 table which ; transaction and printloc.

    field name transaction:-from_warehouse, to_warehouse and ID.

    field name printloc:- warehouse_code and typeprintloc.

    I mean if the user key in the data in from_warehouse (warehouse_code related with table printloc) then field name 'typeprintloc' will increase to 1.

    for example ; if HQA (field name -'from_warehouse') then field name 'typeprintloc' increase from 100 then equal to 101.

    any idea please help...
    Attached Files Attached Files

Posting Permissions

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