Hi.
I started learning VB 6 a few days ago. Now, I am trying to build a database application, similar to a telephone directory.
It performs basic functions as displaying name,number and email id.
i have three buttons on my form, Add, Save and Delete to add new entries or to delete existing ones.
Wat is happening is that when I click the Add button, all the text boxes are blanked out.When I fill in new entries and try saving it, i am getting an error "Insufficie nt base table information for updating or refreshing.".sa me happens for Delete button too.
My code for the Save and delete buttons are as shown below
Please help me!!!
thanks in advance
I started learning VB 6 a few days ago. Now, I am trying to build a database application, similar to a telephone directory.
It performs basic functions as displaying name,number and email id.
i have three buttons on my form, Add, Save and Delete to add new entries or to delete existing ones.
Wat is happening is that when I click the Add button, all the text boxes are blanked out.When I fill in new entries and try saving it, i am getting an error "Insufficie nt base table information for updating or refreshing.".sa me happens for Delete button too.
My code for the Save and delete buttons are as shown below
Please help me!!!
thanks in advance
Code:
Private Sub cmdSave_Click() dtaPhone.Recordset.Update ' Something here??? dtaPhone.Refresh cmdAdd.Enabled = True cmdSave.Enabled = False cmdDelete.Enabled = True txtName.SetFocus End Sub Private Sub cmdDelete_Click() dtaPhone.Recordset.Delete ' Something here??? dtaPhone.Recordset.MoveNext If dtaPhone.Recordset.EOF = True Then dtaPhone.Refresh If dtaPhone.Recordset.BOF = True Then MsgBox "You must add a record.", vbOKOnly + vbInformation, "Empty file" Call cmdAdd_Click Else dtaPhone.Recordset.MoveFirst End If End If txtName.SetFocus End Sub
Comment