Which Property to Use

G

Guest

I have two forms (they are separate forms). One is a calendar (it has to
remain separate). Here is my problem. When I click my calendar, the clicked
date is entered into a control on my second form. When this happens, I want
something else entered into another control on my second form. I can't use
the OnClick property on my calendar to do this (trust me, I can't--it's not
an option--someone else created the calendar and it's locked). Is there
another way I can make this happen? Thanks...
 
R

Rick Brandt

Don said:
I have two forms (they are separate forms). One is a calendar (it
has to remain separate). Here is my problem. When I click my
calendar, the clicked date is entered into a control on my second
form. When this happens, I want something else entered into another
control on my second form. I can't use the OnClick property on my
calendar to do this (trust me, I can't--it's not an option--someone
else created the calendar and it's locked). Is there another way I
can make this happen? Thanks...

Possible...

Open the calendar form using the acDialog optin and then have more code
after the line that opens it. Your calling code will pause until the
calendar is closed or made hidden and then the rest of the code will
execute.

EXAMPLE:
(some code might be here)
DoCmd.OpenForm "CalendarForm",acNormal,,,,acDialog
(some more code goes here)

You can set the value of your second control in the lines of code that
follows the OpenForm line.
 
A

Allen Browne

How does your calendar get called?
Is it a Click event or something?

Can you add another line to the event procedure that calls the calendar, so
that after it runs (presumably it is opened in dialog mode), this event goes
on to the next line also.

That's how you would do it with this calendar:
http://allenbrowne.com/ser-51.html
 
G

Guest

Thank you Rick!
--
Don Rountree


Rick Brandt said:
Possible...

Open the calendar form using the acDialog optin and then have more code
after the line that opens it. Your calling code will pause until the
calendar is closed or made hidden and then the rest of the code will
execute.

EXAMPLE:
(some code might be here)
DoCmd.OpenForm "CalendarForm",acNormal,,,,acDialog
(some more code goes here)

You can set the value of your second control in the lines of code that
follows the OpenForm line.
 

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