currentdb.execute options question

  • Thread starter Thread starter Ivan Grozney
  • Start date Start date
I

Ivan Grozney

Homer Simpson R Me...

I am trying to use
CURRENTDB.EXECUTE strSQL, dbSeeChanges, dbFailOnError
No matter how I put it in the system, I get errors.

How does one use two options with CurrentDB.Execute?

TIA

Vanya
 
The Execute method is only used for Action queries, so dbSeeChanges would not
be appropriate. Also, the Execute method bypassed the Access User Interface,
so it would not apply anyway.

If what you are doing is adding a record that should be in the form's
recordset, then you need to requery the form so the new record will be
included.
 
Klatuu,

Thanks for the info. What I am doing is modifying a vendor database
(sold it to us then left us with a not fully working product and went who
knows where...).

There is a form where the users enter a bundle of data into the main
form and six or seven sub forms with sub forms. When they hit cancel, it is
all supposed to go away. Now that doesn't work AND the backend is on a SQL
Server. Without the dbSeeChanges I get errors for all my delete queries.

For the near term until I can redo all the forms into unbound columns
and then when they hit finish apply it all I am attempting to delete all the
data they just entered. If I do it without the dbSeeChanges, I get errors.
I can do it with just dbSeeChanges but I like to have the dbFailOnError for
the warm fuzzes I get.

They want me to fix this today so I tried this approach. So while it
may not be the best way to delete the data via a bunch of delete queries
which was my solution to fix it today or else...

Anyway, that is why I am asking.

Vanya
 
I have no idea why it is requirng the dbSeeChanges. I have never seen this
happen before.
 
You should be able to use

CURRENTDB.EXECUTE strSQL


try the above.

Also try

debug.print strSQL

Take the the sql shown from the debug window, cut + paste it into a new
query. Does the sql run??? (you ***really*** want to try this idea).
 
Back
Top