Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2003
    Location
    South Africa
    Posts
    8

    Unanswered: Auto Number Using VB AND ACCESS

    To insert data into a field of data type Number, we use

    "INSERT INTO table
    VALUES(" & text1.text & "')"

    What need to be used in order to replace text1.text, to insert into a field of data type "Auto Number" in order to Auto Increment using VB and Access

    Please, do not mind my English. I am a South African.

  2. #2
    Join Date
    Nov 2003
    Posts
    48
    The syntax for insert is

    INSERT INTO TABLE (FIELD1, FIELD2, FIELD3)
    VALUES (VALUE1, VALUE2, VALUE3)

    if data type for FIELD1 is "Auto Number",
    you don't have to specify it in the insert statement

    i.e.
    the insert statement should look like
    INSERT INTO TABLE (FIELD2, FIELD3)
    VALUES (VALUE2, VALUE3)
    Shianmiin

Posting Permissions

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