Passing Control object to another code to 'Execute'

G

Guest

I am using one form with an activex calendar control on it to set the date
values in text boxes on many other forms. (I.E. dbl-clicking the date field
will bring up a pop-up form with the calendar, passing the control that needs
to be updated to the pop-up form. When the date is dbl-clicked, it uses the
control passed to update that control on the original form).
This works perfectly now. However, if the text boxes that I am setting the
dates in has an 'After_Update' event, that event does not fire using this
method. I would like to be able to pass along with the control a 0 to mean
no further action other than updating the control, or a 1 to mean update the
control AND run the _AfterUpdate event for that code.
Here's a picture of it now:
Form1 has a control txtDate
txtDate has a _DblClick
modCalendar.GetDate (Forms![Form1].[txtDate])

when dbl-clicked, the calendar pop-up is opened it accepts the
(Forms![Form1].[txtDate]) into modCalendar(ctlDateCtl as Control), and when a
date on the pop-up is dbl-clicked, it runs:
ctlDateCtl.Value = Me!Calendar.Value


Back on Form1, the txtDate also has an _AfterUpdate that needs to run.


Any suggestions would be appreciated!
 
J

Jonathan Parminter

Hi Gary, have you tried using .setfocus to move focus to
another control?

Luck
Jonathan
 

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