Writing to a table through vba

  • Thread starter Thread starter Carlos
  • Start date Start date
C

Carlos

Hi Everyone,

What are the steps and syntax to open a connection, write
something to a table, close the connection?

I have a subform with 3 links to the main form so
everytime something in the subform is changed it
automatically saves 3 other fields but I need it to save
one more so I have to code it to write itself.

Unless you know another way?
 
for example you can fo the following (in case you use ADO)
currentproject.activeconnection.execute "insert into Table1 (f1,f2,f3)
Values (" & me.textbox1 & "," & me.textbox2 & "," & me.textbox3 & ")"
 
Im not using ADO. I have a db on the network. The forms
and queries are loaded on the c drive and it is linked to
db on the network. I dont use any special connections
just a straight up link.
 
Back
Top