I have a string called "MyStr" that has a name in it.
I want to be able to insert that name into a table in my Access database called tblData that has a field called Name.
Could someone hook me up with the VB to do this?
Thanks,
Netooi
nee,
Is this a variable, ie dim Mystr as string? Then you give it a value? If so, do
docmd.runsql "Insert into TheTable (NameField) Values(""" & Mystr & """"
This assumes this is a New Record....if it exists, and you're Updating, then you need ot know the Key, and you'd do
docmd.runsql "Update TheTable set NameField = """ & mystr & """ WHERE Key = " & variableKey
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.