VB abd Databases

Hi,

I need to know the command that will allow me to deposit the contents of 2 text fields into 2 corrosponding fields in an Access database.
jazzanovaAsked:
Who is Participating?
 
AndySulzConnect With a Mentor Commented:
use 1 data control and use 4 text boxes....1 will be for 1 field and the other will be for the other field...the last 2 are for inputs....after a command button is clicked...

data1.recordset.addnew
text3.text = text1.text
text4.text = text2.text
data1.update
0
 
JHausmannCommented:
Set db = Workspaces(0).OpenDatabase("c:\database\location")
sSQL = "Update table set field1='" & trim(form.text1.text) & "', field2=" & clng(form.text2.text) & " where condition"

db.Execute sSQL
0
 
AndySulzCommented:
make text3 & text 4.visible = false
0
All Courses

From novice to tech pro — start learning today.