Append Query Macros

G

Guest

I am trying to creat an append query from a table [Prospective Gains] to
table [DIVO Form] I have set up an append query from the Gains table to the
Divo table with a delete query and set the close procedure to the following:
Private Sub Form_Close()
DoCmd.RunMacro "gains"
End Sub

The end result should be that when I click on the checkbox the appropriate
data should add to the DIVO Table and all data should delete out of the Gains
Table. I have gotten such a query to work earlier when people detach.
However, I am unable to get this query to work. I hav etried to copy and
paste and change the appropriate tables and building from scratch. Where am
I going wrong? I realize there are a lot of variables here.
 
S

Steve Schapel

MTstraw,

First of all, why are you using a VBA procedure to run the macro? You
can just enter the macro name 'gains' directly to the event property.

Can you please give some more informatuion about "query to work"? What
actually happens? Error message? Nothing at all? Append happens but
not delete? Something else?

Also, could you please post back with the SQL view of the queries?
Might help give a clue as to what is going on. Thanks.
 
G

Guest

I was getting insert into errors I have since got that fixed, but know it
acts like there is no command there. When I click the check box it is doing
nothing. I tried running the macro and getting the same errors was just
trying a different route.

Steve Schapel said:
MTstraw,

First of all, why are you using a VBA procedure to run the macro? You
can just enter the macro name 'gains' directly to the event property.

Can you please give some more informatuion about "query to work"? What
actually happens? Error message? Nothing at all? Append happens but
not delete? Something else?

Also, could you please post back with the SQL view of the queries?
Might help give a clue as to what is going on. Thanks.

--
Steve Schapel, Microsoft Access MVP
I am trying to creat an append query from a table [Prospective Gains] to
table [DIVO Form] I have set up an append query from the Gains table to the
Divo table with a delete query and set the close procedure to the following:
Private Sub Form_Close()
DoCmd.RunMacro "gains"
End Sub

The end result should be that when I click on the checkbox the appropriate
data should add to the DIVO Table and all data should delete out of the Gains
Table. I have gotten such a query to work earlier when people detach.
However, I am unable to get this query to work. I hav etried to copy and
paste and change the appropriate tables and building from scratch. Where am
I going wrong? I realize there are a lot of variables here.
 

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