Update Queries and other actions

G

Guest

Good afternoon
I have a macro that's hanging on me, and I am not able to determine cause. I'm on Win2000 running Access 2000.

This runs OnClick on a form

GotoRecord - Next (to complete the record
OpenQuery - "Update", (action query) in Datasheet view Edit Data Mode - changes the status to "Acknowledged
GotoRecord - Previous (to get off New Record if that's where I am
SendObject - condition = [Forms]![Open_Requests].[Update_Result] = 1 **Note: Update_Result is an option group and 1 is "Acknowledged", which is the submacro I want to run**, Query, Send_Updated_Status, .xls format, Subject: Acknowledged, Text: message, Edit Message (yes
OpenQuery - "Update2", (action query) in Datasheet view Edit Data Mode - changes "Selected" to False (unchecked)

I wasn't having trouble with this the other day, I don't think. I added new actions to take care of Acknowledged --> Scheduled status change, including travel itinerary and how much work needed to be done onsite. I removed the new actions to troubleshoot, but I still cannot find the problem, even when I step run it

Can someone help me, please

Thank you
Derek
 
N

Nikos Yannacopoulos

Derek,

The fact that it runs OK when you step into indicates that
your problem is a timing issue, most likely...
One possibility is that your gotorecord - previous is
executed before the update query has finished and focus is
returned to the form (?). Try to insert a
OpenForm - the form name
before the gotorecord - previous to make sure focus is on
the form. Not sure this is it, but worth giving a shot!

Nikos
-----Original Message-----
Good afternoon,
I have a macro that's hanging on me, and I am not able to
determine cause. I'm on Win2000 running Access 2000.
This runs OnClick on a form:

GotoRecord - Next (to complete the record)
OpenQuery - "Update", (action query) in Datasheet view
Edit Data Mode - changes the status to "Acknowledged"
GotoRecord - Previous (to get off New Record if that's where I am)
SendObject - condition = [Forms]![Open_Requests].
[Update_Result] = 1 **Note: Update_Result is an option
group and 1 is "Acknowledged", which is the submacro I
want to run**, Query, Send_Updated_Status, .xls format,
Subject: Acknowledged, Text: message, Edit Message (yes)
OpenQuery - "Update2", (action query) in Datasheet view
Edit Data Mode - changes "Selected" to False (unchecked).
I wasn't having trouble with this the other day, I don't
think. I added new actions to take care of Acknowledged --
Scheduled status change, including travel itinerary and
how much work needed to be done onsite. I removed the new
actions to troubleshoot, but I still cannot find the
problem, even when I step run it.
 
G

Guest

Thank you, Nikos. I tried just redoing the macro altogether, and shortened the Message Text in the SendObject email. That seemed to make it work, but I'm not sure why

Dere

----- Nikos Yannacopoulos wrote: ----

Derek

The fact that it runs OK when you step into indicates that
your problem is a timing issue, most likely..
One possibility is that your gotorecord - previous is
executed before the update query has finished and focus is
returned to the form (?). Try to insert a
OpenForm - the form nam
before the gotorecord - previous to make sure focus is on
the form. Not sure this is it, but worth giving a shot

Niko
-----Original Message----
Good afternoon
I have a macro that's hanging on me, and I am not able to
determine cause. I'm on Win2000 running Access 2000.
OpenQuery - "Update", (action query) in Datasheet view
Edit Data Mode - changes the status to "Acknowledged
GotoRecord - Previous (to get off New Record if that's where I am
SendObject - condition = [Forms]![Open_Requests]
[Update_Result] = 1 **Note: Update_Result is an option
group and 1 is "Acknowledged", which is the submacro I
want to run**, Query, Send_Updated_Status, .xls format,
Subject: Acknowledged, Text: message, Edit Message (yes
OpenQuery - "Update2", (action query) in Datasheet view
Edit Data Mode - changes "Selected" to False (unchecked)think. I added new actions to take care of Acknowledged -
Scheduled status change, including travel itinerary and
how much work needed to be done onsite. I removed the new
actions to troubleshoot, but I still cannot find the
problem, even when I step run it
 
G

Guest

Hmm.... now, it no longer works. And I am still not sure why. Would it matter if I already have the form (the one you suggested I OpenForm to) open?

Derek

----- Derek Wittman wrote: -----

Thank you, Nikos. I tried just redoing the macro altogether, and shortened the Message Text in the SendObject email. That seemed to make it work, but I'm not sure why.

Derek

----- Nikos Yannacopoulos wrote: -----

Derek,

The fact that it runs OK when you step into indicates that
your problem is a timing issue, most likely...
One possibility is that your gotorecord - previous is
executed before the update query has finished and focus is
returned to the form (?). Try to insert a
OpenForm - the form name
before the gotorecord - previous to make sure focus is on
the form. Not sure this is it, but worth giving a shot!

Nikos
-----Original Message-----
Good afternoon,
I have a macro that's hanging on me, and I am not able to
determine cause. I'm on Win2000 running Access 2000.
OpenQuery - "Update", (action query) in Datasheet view
Edit Data Mode - changes the status to "Acknowledged"
GotoRecord - Previous (to get off New Record if that's where I am)
SendObject - condition = [Forms]![Open_Requests].
[Update_Result] = 1 **Note: Update_Result is an option
group and 1 is "Acknowledged", which is the submacro I
want to run**, Query, Send_Updated_Status, .xls format,
Subject: Acknowledged, Text: message, Edit Message (yes)
OpenQuery - "Update2", (action query) in Datasheet view
Edit Data Mode - changes "Selected" to False (unchecked).think. I added new actions to take care of Acknowledged --
Scheduled status change, including travel itinerary and
how much work needed to be done onsite. I removed the new
actions to troubleshoot, but I still cannot find the
problem, even when I step run it.
 

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