Results 1 to 4 of 4

Thread: VBA Rollover

  1. #1
    New Lounger
    Join Date
    Nov 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post VBA Rollover

    Hi Im a newbee withMS 2010 Access and I am trying to rollover for a course i have to move all the students up a level after a particular date.
    Can you pls help me?

  2. #2
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    6,405
    Thanks
    208
    Thanked 833 Times in 766 Posts
    Shizzy,

    Welcome to the lounge as a new poster.

    You'll have to provide a little more information for us to be able to provide any useful assistance.
    1. What does your table(s) structure look like?
    2. What exactly do you mean by "move up a level"?
    3. Any other info you feel might be useful.
    May the Forces of good computing be with you!

    RG

    VBA Rules!

    My Systems: Desktop Specs
    Laptop Specs


  3. #3
    New Lounger
    Join Date
    Nov 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi,
    We used the template of students from the MS access 2010, so it doesnt have a relationship as such.
    we have a grade system. for example if we had students doing level 2 we want the database to automatically move the students to level 3 the following year.

  4. #4
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    I have just looked at this template. The students table has a field for Level, but it is a text field.
    If the field was a number you could just add 1, but with text you will need to do one of two things.
    The easy option is to separately consider each case. If it currently says Level 2 update it to Level 3, if it currently says Level 3 update to Level 4 etc.
    A more sophisticated approach would use a number of functions to extract the last character, convert it to a number, add 1 then replace the last character with this new increased one.

    Normally you would do all this by running one or more update queries, but you have posted this in the VBA board (rather than the Access board) so I am not sure what type of solution you are looking for, nor what skill base you have. As this is an exercise for a course, it would be useful to know what skills this exercise is supposed to relate to.
    Regards
    John



Posting Permissions

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