No Oject Error

durdle

Registered User.
Local time
Today, 06:57
Joined
May 7, 2002
Messages
130
Hey,

On my form I have command button, when this is clicked a calander pop's up. It works fine on my machine but when I tried it on my friends system the following error message appeared:

"There is no object in this control."

Any idea's on this one.

Thanks

durdle
________
extreme q vaporizer
 
Last edited:
The calendar control it is looking for is missing on the other PC, or is not registered.
 
Hey FoFa,

When you say control do you mean the actual form?

durdle
________
mexico city hotel
 
Last edited:
I just registared the calander control, so now when I click on the button it opens up the calander great, but when I select a day it do not return it to the textbox?

This is weird.
________
chrysler dr platform history
 
Last edited:
lol, the Calendar is pretty much useless without code.

As the calendar is just a control - like a textbox, or a combo - then you'll need to code its events to put the value you want into a textbox.
 
Mile I have the following code behind the button:

On Error GoTo Err_cmdFrom_Click

Me.txtto = Nz(Me.txtto, Date)
Call ShowCalendar(Me.txtto)

Exit_cmdFrom_Click:
Exit Sub

Err_cmdFrom_Click:
MsgBox Err.Description, vbExclamation, "Error #" & Err.Number
Resume Exit_cmdFrom_Click



durdle
________
multi-displacement system
 
Last edited:
All that does is puts today's date (if a date is not already present) in the textbox and calls a sub called ShowCalendar().

The sub ShowCalendar - which I'm guessing came from one of my examples, as it is the exact same code - opens the form with a calendar control on it and assigns the date sent (see first paragraph) to the calendar which displays that value.

On clicking the calendar, a property belonging to the form (made up with the Property Keyword is populated with the selected date and the form closes, returning the final date which the sub ShowCalendar places in the textbox.

You need all three of these components to make the calendar work as you wish.
 

Users who are viewing this thread

Back
Top Bottom