On_Click Problem

  • Thread starter Thread starter Edward Lollar
  • Start date Start date
E

Edward Lollar

Hi, all . . .

I've run into a glitch that I cannot isolate. I have an Access 97 program
that has code that prints reports based on an input box date range. There
is code on the No_Data event to produce a message box if there is no data
and then cancel the action.

In the development version using the full version of MS Access 97, both the
MDB and MDE programs cancel without any problems. However, when I put this
on a test computer using the runtime version of MS Access 97, once the
NO_Data event fires off, an Access message stating:

The expression ON CLICK you entered as the event property setting produced
the following error: *the expression may not result in the name of a macro,
the name of a UDF or Event Procedure . . . blah, blah, blah. You get the
picture.

What is this problem? FYI, the testing version is using Windows NT 4.0 and
the development computer uses XP. I need for this to run on both platforms
as we still have people with either until we get them all changed out.

Many thanks in advance . . .

Edward
 
Turtle,

Below is the code. It has been working in the past when we were working on
purely NT, but with the cross-over of both systems, I'm wondering if there
is a reference problem or missing dll. Suggestions welecome. Again, this
works fine on XP with the full version of the code.

Edward


******BEGIN CODE******
Private Sub Report_NoData(intCancel As Integer)
DoCmd.Beep
MsgBox "There is no data to print for the date ranges selected.",
vbInformation, "No Print Data"
intCancel = True
End Sub
******END CODE******
What is the code in your No_Data event?

- Turtle
 
You may well be right about the reference problems.
Have you checked Tools - Reference from a code window?

- Turtle
 
Hey, Turtle . . .

I've checked it on the XP side in development and the references look fine.
We've reinstalled Access Runtime on the test computer with no luck. I'm now
having a second computer set up for NT that has the full development version
on it. Maybe I can step through it and find the problem then.

Many thanks, though, for trying to help. I may post again if the above
doesn't work. If so, I'll update what I've done so far.

Edward
You may well be right about the reference problems.
Have you checked Tools - Reference from a code window?

- Turtle
 
Hey, Turtle . . .

Thanks, anyway for the assist. I'm going to try setting up an NT
developer's workstation so maybe I can step through the code and find the
problem. If not, I'll post an update here, and we can try to go from
there.

Many thanks again!

Edward
You may well be right about the reference problems.
Have you checked Tools - Reference from a code window?

- Turtle
 
Back
Top