What is "Date"?
Do you have a field by that name?
A text box?
Or is the system date, in which case it is a Date data type and doesn't need
CDate(). (Note that Date is a reserved word both in VBA and in JET.)
What is vbCal?
Is it the name of a calendar control?
Or is it the name of a field?
Why do you need a calendar in Access 2007?
Did you realize the new version automatically displays a little calendar
beside a text box that's bound to a Date/Time field, so you don't need an
external control?
If you really want a popup calendar, would you consider using a little
Access form that has none of the problems of external controls? If so, see:
http://allenbrowne.com/ser-51.html
Have you added your database folder to the list of trusted locations under:
Office Button | Access Options | Trust Center | Trust Center Settings
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Louverril" <(E-Mail Removed)> wrote in message
news:7FE6B45D-E2A5-44E0-A7B0-(E-Mail Removed)...
>I have a calendar pop up form which has the following code in it:
>
> mvCal.Value = CDate(Date)
>
> On my PC it works fine but on transferring to the customer I get the
> following error when the execution hits the line of code above:
>
> "2683 There is no object in this control"
>
> The microsoft calendar control 2007 reference is checked on the accdb file
> I'm running (the one which works fine on my PC), however if you open
> access
> from the problem PC's program menu and create a new database this
> reference
> is not even on the list of available references.
>
> Both PC's are running vista and office professional 2007.
>
> Can anyone help
>
> Thanks Lou