i have this tables
accounts table
accNo - PK (auto increment)
username
password
student table
studentNo - PK (auto increment)
accNo - FK
LName
FName
text1 = username
text2 = password
text3 = FName
text4 = LName
the problem when i click register button
the FName and LName didn't update
Private Sub Command2_Click() With Adodc1 .Recordset.AddNew .Recordset!UserName = Text1.Text .Recordset!Password = Text2.Text .Recordset!FName = Text3.Text .Recordset!LName = Text4.Text .Recordset.Update End With End Sub Private Sub Form_Load() On Error Resume Next Adodc1.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=database.accdb;Persist Security Info=False" Adodc1.RecordSource = "Select * From register" Set DataGrid1.DataSource = Adodc1 End Sub

New Topic/Question
Reply



MultiQuote



|