Results 1 to 3 of 3

Thread: For... Next statement in access

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2004
    Location
    Lucenec, Slovakia
    Posts
    154

    Lightbulb For... Next statement in access

    Hi guys,

    I would like to start programming VB macros in Access. Can anybody show me how to declare a For... Next statement in MS Access?

    For example I have table "Prices" with two fields "Item" and "Month". The Month field should change value from 1 to 12.

    Thanks.

    Boris

  2. #2
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    Re: For... Next statement in access

    This forum is for Reporting...

    This post could slot into VB, VBA or Databases just for future reference.

    What exactly do you have (test data) and what are you trying to do with it?
    Are you asking for items to be created or how to make sure that the month number is between 1 and 12?

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Nov 2004
    Location
    Lucenec, Slovakia
    Posts
    154

    Re: For... Next statement in access

    Quote Originally Posted by Ecniv
    This forum is for Reporting...

    This post could slot into VB, VBA or Databases just for future reference.

    What exactly do you have (test data) and what are you trying to do with it?
    Are you asking for items to be created or how to make sure that the month number is between 1 and 12?
    Sorry for answearing so late. I have database about stock. Where is actual state of stock amount of every item for the last month and changes for every previous months. From this data I would like to calculate state of the stock for every month at first. Then I will try to do this on daily basis.
    Example database:

    month item value type
    8 M234 1000 State
    8 M234 300 change
    7 M234 500 change
    6 M234 -300 change
    5 M234 200 change
    4 M234 -100 change
    3 M234 70 change
    2 M234 130 change
    1 M234 200 change
    8 M242 5000 state
    8 M242 -400 change
    7 M242 -700 change
    6 M242 100 change
    5 M242 212 change
    4 M242 170 change
    3 M242 -73 change
    2 M242 231 change
    1 M242 240 change

Posting Permissions

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



Click Here to Expand Forum to Full Width