Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi,

 

I have a form in VB 6 called frmEMPLOYEE with 3 textboxes namely: First_Name, Last_Name and Employee_Id . I also have a table in access called tblEMPLOYEE. How to I create a button to take whatever that I have on the text boxes and puts in into the database.

 

"I have already set the connectionstring and set the recordsource and the built process was successful."

 

I have tried:

 

 

Private Sub Command1_Click()

 

Dim Rs As Recordset

 

'Set Rs = CurrentDb.OpenRecordset("tblEmployee", dbOpenTable)

 

Rs.AddNew

 

Rs("Employee_Id").Value = Text3

Rs("First_Name").Value = Text1

Rs("Last_Name").Value = Text2

 

Rs.Update

End Sub

 

But this doen't help. Again how do I link the application with the database. I am using access 2000 and VB 6

 

Thanks

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...