"Requery" action is failing in a macro

C

Chuck Chopp

I have a form in an Access 2000 database application that calls a macro when
the On Activate event occurs. This macro simply performs the Requery action
and does not specify any object/control name in the parameter which should
result in the data source for the form [a query] being refreshed.
Previously, this worked w/o any problems at all. Recently, some changes
were made to record definitions in some of the tables [these are linked
tables in a .MDB file that is separate from the one that the forms, macros &
modules exist in], but no changes were made that should have affected the query.

Anyway, whenever the macro is executed, a message box is displayed as follows:

Title = "Action failed"

The macro name, a condition value of "True", an action name of "Requery" and
an empty string for "Arguments" are all displayed in the message box.

The only button that isn't disabled is "Halt".

When I click on the "Halt" button, the macro is halted and then the form
displays itself and it appears that all of the records [this is a master
record form] are displayed on the form. If I give focus to a different form
and then return to this form again, the On Activate event occurs again and
the same message box is displayed again.

I've been searching Google and the MS KB but I've not found any definitive
results that explain why this might be happening.

Does anybody have any additional ideas regarding things that need to be
examined in my form, query, macros or tables to find the source of this problem?


TIA,

Chuck
--
Chuck Chopp

ChuckChopp (at) rtfmcsi (dot) com http://www.rtfmcsi.com
ICQ # 22321532
RTFM Consulting Services Inc. 864 801 2795 voice & voicemail
103 Autumn Hill Road 864 801 2774 fax
Greer, SC 29651 800 774 0718 pager
8007740718 (at) skytel (dot) com

Do not send me unsolicited commercial email.
 
C

Chuck Chopp

Additional information:

I replaced the macro that uses the Requery action with a VB event procedure
that calls the Requery method for the form. I simply use "Me.Requery" in
the event procedure. I am still getting an error when the requery is
performed, but the message is slightly more informative and appears as follows:

Message box title = "Microsoft Visual Basic"
Message box text is as follows:

Run-time error '2465':
CDM Update Database can't find the field "|" referred to in your
expression.

The enabled buttons are "End", "Debug" and "Help".


I've reviewed the query object that the form uses as a data source [in
design view and in SQL view] and I cannot find any occurrences of a field
named "|" being used at all.

Any ideas what might be going wrong?


TIA,

Chuck
--
Chuck Chopp

ChuckChopp (at) rtfmcsi (dot) com http://www.rtfmcsi.com
ICQ # 22321532
RTFM Consulting Services Inc. 864 801 2795 voice & voicemail
103 Autumn Hill Road 864 801 2774 fax
Greer, SC 29651 800 774 0718 pager
8007740718 (at) skytel (dot) com

Do not send me unsolicited commercial email.
 
G

Gary Miller

Would it be possible for you to post the SQL of the query as
well as the code you are using. That may be a great help for
troubleshooting. Also, it would be helpful to know what line
it goes to when you choose 'Debug'.
--

Gary Miller
Gary Miller Computer Services
Sisters, OR
________________________
 
C

Chuck Chopp

Gary said:
Would it be possible for you to post the SQL of the query as
well as the code you are using. That may be a great help for
troubleshooting. Also, it would be helpful to know what line
it goes to when you choose 'Debug'.


I accidentally did some improper cross-posting earlier and managed to
separate this thread from a thread in 2 other news groups.

The line that it goes to is "Me.Requery" when I click "Debug".

The SQL of the query is quite simple; here it is:

SELECT CMT001OSI.[CDM-CODE], CMT001OSI.[Bill Description],
CMT001OSI.[Revenue Dept], CMT001OSI.[Effective date],
CMT001OSI.[NON-STANDARD], CMT001OSI.[Status Code]
FROM CMT001OSI;

Per my reply in one of the other threads I started, I found another instance
of a macro being called in response to an event where elimination of that
macro results in the form operating properly. I have a different puzzle to
solve now.


--
Chuck Chopp

ChuckChopp (at) rtfmcsi (dot) com http://www.rtfmcsi.com
ICQ # 22321532
RTFM Consulting Services Inc. 864 801 2795 voice & voicemail
103 Autumn Hill Road 864 801 2774 fax
Greer, SC 29651 800 774 0718 pager
8007740718 (at) skytel (dot) com

Do not send me unsolicited commercial email.
 
G

Gary Miller

Good luck with it.
--

Gary Miller
Gary Miller Computer Services
Sisters, OR
________________________
Chuck Chopp said:
Gary said:
Would it be possible for you to post the SQL of the query as
well as the code you are using. That may be a great help for
troubleshooting. Also, it would be helpful to know what line
it goes to when you choose 'Debug'.


I accidentally did some improper cross-posting earlier and managed to
separate this thread from a thread in 2 other news groups.

The line that it goes to is "Me.Requery" when I click "Debug".

The SQL of the query is quite simple; here it is:

SELECT CMT001OSI.[CDM-CODE], CMT001OSI.[Bill Description],
CMT001OSI.[Revenue Dept], CMT001OSI.[Effective date],
CMT001OSI.[NON-STANDARD], CMT001OSI.[Status Code]
FROM CMT001OSI;

Per my reply in one of the other threads I started, I found another instance
of a macro being called in response to an event where elimination of that
macro results in the form operating properly. I have a different puzzle to
solve now.


--
Chuck Chopp

ChuckChopp (at) rtfmcsi (dot) com http://www.rtfmcsi.com
ICQ # 22321532
RTFM Consulting Services Inc. 864 801 2795 voice & voicemail
103 Autumn Hill Road 864 801 2774 fax
Greer, SC 29651 800 774 0718 pager
8007740718 (at) skytel (dot) com

Do not send me unsolicited commercial email.
 
T

Tom Wickerath

Chuck,

From your last paragraph shown below, it is really unclear to me whether or not you have
solved your requery issue....

If you still have this problem, could you have renamed any of the fields in the table?
Perhaps the controlsource for one of the textboxes on your form did not get updated
properly. Also verify that you don't have a Filter or Order By specified on a misspelled
or deleted field.

Tom
_______________________________________

Gary said:
Would it be possible for you to post the SQL of the query as
well as the code you are using. That may be a great help for
troubleshooting. Also, it would be helpful to know what line
it goes to when you choose 'Debug'.


I accidentally did some improper cross-posting earlier and managed to
separate this thread from a thread in 2 other news groups.

The line that it goes to is "Me.Requery" when I click "Debug".

The SQL of the query is quite simple; here it is:

SELECT CMT001OSI.[CDM-CODE], CMT001OSI.[Bill Description],
CMT001OSI.[Revenue Dept], CMT001OSI.[Effective date],
CMT001OSI.[NON-STANDARD], CMT001OSI.[Status Code]
FROM CMT001OSI;

Per my reply in one of the other threads I started, I found another instance
of a macro being called in response to an event where elimination of that
macro results in the form operating properly. I have a different puzzle to
solve now.


--
Chuck Chopp

ChuckChopp (at) rtfmcsi (dot) com http://www.rtfmcsi.com
ICQ # 22321532
RTFM Consulting Services Inc. 864 801 2795 voice & voicemail
103 Autumn Hill Road 864 801 2774 fax
Greer, SC 29651 800 774 0718 pager
8007740718 (at) skytel (dot) com

Do not send me unsolicited commercial email.
 

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