-
I'm using VB6 and Access 97.
I want to run an Append query using VB.
I've got a Query called Transfer which has a parameter called Refno.
I want to be able to send the reference from VB into this query. Which will hopefully run this query and update another table. Could anyone please give me some help?
------------------
Thanks in advance for any help provided.
-
Hi parkes, try this:
Dim qdf As QueryDef
On Error GoTo ErrorHandler
Set qdf = dbData.QueryDefs("Transfer")
qdf.Parameters("Refno").Value = <ValueOfRefno>
qdf.Execute dbFailOnError
...
ErrorHandler
...
where dbData is your (opened) database object.
Hope this is of some use
[This message has been edited by Michael (edited 07-30-1999).]
-
Thanks for that, it work. But how do you do the same thing using ADO.
------------------
Thanks in advance for any help provided.
-
Thats a good question! I'm still trying to get to grips with ADO myself. My company has decided that we will stick with DAO for the time being so I am not so familiar with ADO as I would like to be! I'm trying to learn it in my spare(?) time.