Go Back   Computer Forums > General Computing > Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 09-08-2004, 11:48 AM   #1
Solid State Member
 
Join Date: Aug 2004
Posts: 8
Default AddNew command button

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
Tshimega is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 05:15 PM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0