Hi everyone,
I really appreciate all of you experts that take the time out to help us VB challenged people.
From VB6, I am able to execute a query in my MS Access database. This query has parameters that I pass. It runs the query but the values are the actual variable names "var1" and "var2" in the access table.
What syntax do I need around the parameters to pass the values of the field. line --> DB.Execute "exec mytableupdateq val1 , val2"
Thanks in advance for your time.
Paul
Here is my code:
========
Private Sub cmd_runqry_Click()
Dim val1, val2, ret
val1 = Textname.Text
val2 = inv_date.Text
Dim DB
Set DB = CreateObject("ADODB.Connection")
DB.Mode = adModeReadWrite
DB.Open ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\SPE_V1_COPY.mdb")
DB.Execute "exec mytableupdateq val1 , val2"
DB.Close
MsgBox ("The update completed successfully")
End Sub
==================
I really appreciate all of you experts that take the time out to help us VB challenged people.
From VB6, I am able to execute a query in my MS Access database. This query has parameters that I pass. It runs the query but the values are the actual variable names "var1" and "var2" in the access table.
What syntax do I need around the parameters to pass the values of the field. line --> DB.Execute "exec mytableupdateq val1 , val2"
Thanks in advance for your time.
Paul
Here is my code:
========
Private Sub cmd_runqry_Click()
Dim val1, val2, ret
val1 = Textname.Text
val2 = inv_date.Text
Dim DB
Set DB = CreateObject("ADODB.Connection")
DB.Mode = adModeReadWrite
DB.Open ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\SPE_V1_COPY.mdb")
DB.Execute "exec mytableupdateq val1 , val2"
DB.Close
MsgBox ("The update completed successfully")
End Sub
==================