difficult event firing problem

M

Mark Andrews

Not sure anyone can help but thought I would ask, maybe someone has an idea
to try. Here's my problem:

I have an activex calendar control on an Access 2000 form. The user can
paste events from one day to another in two ways:

Way #1: select an event, choose copy then choose paste (from the top menu).
Works fine.

Way #2: select an event, choose copy then choose paste from a popup context
menu. Does not fully work.

Copy works fine either way (top menu or context menu) but for paste here is
what happens on way #1:

1- Menu choice Calls Public PasteEvent() function

Public Function PasteEvent()
Dim av As CalendarView

Set av = Forms!frmAppointments.CalendarControl.ActiveView

If av.CanPaste Then
av.Paste
Else
MsgBox "You must copy an event before you can paste it to this
location."
End If
End Function

2. An event is fired:
CalendarControl_BeforeEditOperation and this is where I do what is needed to
the event.


On way #2 with the context menu the same PasteEvent() function is called and
code is run exactly the same way but the event to trigger
CalendarControl_BeforeEditOperation is not fired????

I show the context menu with this code:
CommandBars("RPTPopupMenu2").ShowPopup in CalendarControl_ContextMenu() in
code behind the form itself.

Help!!!!!!!
Mark
 

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