Setting value in unbound table

J

Junior

Using VBA in the Form open event
How could i set a value in
[tblOne]. [fieldOne]

where [fieldOne] is integer from a
form [FormOne] that is not bound to [tblOne]
Thanks
 
M

MDW

-----Original Message-----
Using VBA in the Form open event
How could i set a value in
[tblOne]. [fieldOne]

where [fieldOne] is integer from a
form [FormOne] that is not bound to [tblOne]
Thanks


The following code could actually be placed anywhere, on a
button's Click event or whatever.

strSQL = "INSERT INTO tblOne (fieldOne) VALUES (" & intOne
& ")"
DBEngine.Workspaces(0).Databases(0).Execute strSQL

Obviously, your SQL statement could be as complex or
simple as required.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top