Results 1 to 3 of 3

Thread: Update database problem

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2005
    Location
    Winston Salem
    Posts
    45

    Update database problem

    I've made a form that adds a new client to my database. There is a field Labled IDNumber that is not edited on the form. I want the number to be the last IDNumber + 1. this number will be in a relationship in other tables. but i need to know how to pull the number and add 1 to it before the update statement.

  2. #2
    Addicted Member
    Join Date
    Nov 2005
    Posts
    183

    Re: Update database problem

    VB Code:
    1. Dim Table1 As New dsTable1.Table1Row() = dsTable1.Table1.Select()
    2.  
    3. Dim NewIDNumber As Integer = Table1(0).IDNumber + 1

    Replace "Table1(0)" with "Table1(Desired Record Index)"

  3. #3
    Hyperactive Member
    Join Date
    Jul 2005
    Posts
    394

    Re: Update database problem

    I've made a form that adds a new client to my database. There is a field Labled IDNumber that is not edited on the form. I want the number to be the last IDNumber + 1. this number will be in a relationship in other tables. but i need to know how to pull the number and add 1 to it before the update statement.
    Are you using an Access database? If so just set you column to autonumber.

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