Results 1 to 2 of 2

Thread: Incrementing an Integer variable value

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2015

    Question Incrementing an Integer variable value

    Hi all, I am writing a small application using VB 6.0 which uses a MS Access Database as a back-end storage for data. I had been successfully inserted and retrieved some data from the database using my designed Forms, but I just don't know how to necessarily increment an Integer variable value after successful insertion of data in the database.

    For example,
    I have a Form to insert studentName, address, email, birthDate and invoiceNumber inside the Student Table.
    PROBLEM: If the program successfully insert all those data in the Student table, I want to increment the invoiceNumber by one (1).
    I'm pretty sure Looping must be involved but I just wanted to get the right syntax of doing so.

    I had created a Database in MS Access 2003, but now I upgrade my Office to 2010 but it can still read that old (.mdb) file, and my application progress works fine in cases of inserting and retrieving data from the database.

    Any help will appreciate! Thanks!

  2. #2
    Frenzied Member
    Join Date
    Jun 2014

    Re: Incrementing an Integer variable value

    Please post the code you are using for inserting records

    question: why do you store an invoice number in the students table ?

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