Hi there, arali!
Just get the RecordCount and add it by 1.
- Dim adoNum as New Adodb.Recordset
-
Set adoNum = New Adodb.Recordcount
-
-
adoNum.Open "SELECT * FROM tblData",CoNN,3,3
-
-
txtInputNo.Text = adoNum.Recordcount + 1
-
-
adoNum.Close
-
Set adoNum = Nothing
Hope this will help ^^
Better Than Yesterday (-.-)
thank for your help
Now i use data connection to connect Access database
and Add two commands
One command is based on SQL Query
select max(input no) +1 from mytable
I bind this command to textbox Now it show me the next inputno
And the second command is use d for the table other fields
the point is all the fields is of the same table including inputno ,but using two commands .
now tell me how i write codding for Save button.So it can store inputno and other fields data.
name of connection is connection1
And name command are command1,command2.
Thank you iam waiting for your kind response.
Regards
<<Arali>>