|
-
Jul 29th, 1999, 02:59 PM
#1
Thread Starter
Hyperactive Member
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.
-
Jul 29th, 1999, 04:15 PM
#2
Lively Member
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).]
-
Jul 29th, 1999, 06:02 PM
#3
Thread Starter
Hyperactive Member
Thanks for that, it work. But how do you do the same thing using ADO.
------------------
Thanks in advance for any help provided.
-
Jul 29th, 1999, 06:07 PM
#4
Lively Member
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|