By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,224 Members | 1,143 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,224 IT Pros & Developers. It's quick & easy.

Menu resets after docmd.cancelevent

P: n/a
Hello there!

I have an access application which is controlled by a custom menubar.
This bar is controlled by commands like:

CommandBars("CustomBar").Controls(1).Controls(2).C ontrols(3).Visible =
True / False

I also have a function that is called on the NoData event of a report.
(Properties of report - Events - No data NoDataCL([report]) )

In that function the 'DoCmd.CancelEvent' is executed. (see function

Whenever that happens all! menuitems become visible!
Since some of these access functions that some users should not be able
to use this is very annoying and very undesirable!
I tried defining the menus again before this happens, in the function
but to no avail....
Is this behaviour known? Is there anything I can do to prevent it?

----------Called function---------------

Public Function NoDataCL(rpt As Report)

'Purpose: Called by report's NoData event.
'Usage: =NoData([Report])

Dim strCaption As String 'Caption of report.

strCaption = rpt.Caption
If strCaption = vbNullString Then
strCaption = rpt.Name
End If


MsgBox "No data found.", vbInformation, "No data..."

End Function

I would be happy if you would think about this

Nov 29 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.