Re: Update database problem
VB Code:
Dim Table1 As New dsTable1.Table1Row() = dsTable1.Table1.Select()
Dim NewIDNumber As Integer = Table1(0).IDNumber + 1
Replace "Table1(0)" with "Table1(Desired Record Index)"
Re: Update database problem
Quote:
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.