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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
AndySulzCommented:
make text3 & text 4.visible = false
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.