Connecting Tech Pros Worldwide Help | Site Map

Compiler error: A module is not a valid type.

 
LinkBack Thread Tools Search this Thread
  #1  
Old June 16th, 2006, 04:55 AM
swingingming
Guest
 
Posts: n/a
Default Compiler error: A module is not a valid type.

Hi, When i try to set calendar value, i got such error. the parameters
are: (cboDateComponent As ComboBox, ocxCalendar As Calendar)
Thank you.


  #2  
Old June 16th, 2006, 06:35 AM
pietlinden@hotmail.com
Guest
 
Posts: n/a
Default Re: Compiler error: A module is not a valid type.


swingingming wrote:[color=blue]
> Hi, When i try to set calendar value, i got such error. the parameters
> are: (cboDateComponent As ComboBox, ocxCalendar As Calendar)
> Thank you.[/color]

Gee, I don't know... any idea what this mark on my arm is? You mean
you can't see it? Well, I can't see your code either. That would help
a lot.

  #3  
Old June 16th, 2006, 08:05 AM
swingingming
Guest
 
Posts: n/a
Default Re: Compiler error: A module is not a valid type.

Code:
Option Compare Database
Option Explicit
'Dim cboOriginator As ComboBox
Public Sub setDate(cboDateComponent As ComboBox, ocxCalendar As
Calendar, cboOriginator As ComboBox)
Set cboOriginator = cboDateComponent
ocxCalendar.Visible = True
ocxCalendar.SetFocus
If Not IsNull(cboDateComponent) Then
ocxCalendar = cboOriginator
Else
ocxCalendar = Date
End If
End Sub

The commented out line should be put into a Form module.
Thanks

pietlinden@hotmail.com wrote:[color=blue]
> swingingming wrote:[color=green]
> > Hi, When i try to set calendar value, i got such error. the parameters
> > are: (cboDateComponent As ComboBox, ocxCalendar As Calendar)
> > Thank you.[/color]
>
> Gee, I don't know... any idea what this mark on my arm is? You mean
> you can't see it? Well, I can't see your code either. That would help
> a lot.[/color]

  #4  
Old June 17th, 2006, 07:15 AM
pietlinden@hotmail.com
Guest
 
Posts: n/a
Default Re: Compiler error: A module is not a valid type.


swingingming wrote:[color=blue]
> Code:
> Option Compare Database
> Option Explicit
> 'Dim cboOriginator As ComboBox
> Public Sub setDate(cboDateComponent As ComboBox, ocxCalendar As
> Calendar, cboOriginator As ComboBox)
> Set cboOriginator = cboDateComponent
> ocxCalendar.Visible = True
> ocxCalendar.SetFocus
> If Not IsNull(cboDateComponent) Then
> ocxCalendar = cboOriginator
> Else
> ocxCalendar = Date
> End If
> End Sub
>
> The commented out line should be put into a Form module.
> Thanks
>[/color]

ACK!!tiveX.. YECH! Use something like the Calendar in ADH (choose your
version). Works great and NO ActiveX controls to register.
http://www.developershandbook.com/
I think the code is there. Splurge and buy the book. Well worth the
money.

Their code has a function that returns a date that you choose from a
calendar form. And it WORKS. (Without ActiveX controls =) )

  #5  
Old June 17th, 2006, 11:45 PM
Larry Linson
Guest
 
Posts: n/a
Default Re: Compiler error: A module is not a valid type.

<pietlinden@hotmail.com> wrote
[color=blue]
> ACK!!tiveX.. YECH! Use something like
> the Calendar in ADH (choose your
> version). Works great and NO ActiveX
> controls to register.
> http://www.developershandbook.com/
> I think the code is there. Splurge and buy
> the book. Well worth the money.
>
> Their code has a function that returns a
> date that you choose from a calendar form.
> And it WORKS. (Without ActiveX controls =) )[/color]

Not to belittle the Access Developer's Handbook, because I have a copy of
every version and as Michka might say, "I'd rather slide down a giant razor
blade into a vat of iodine than give up any copy."

But MVP Arvin Meyer, at http://www.datastrat.com and MVP Stephen Lebans, at
http://www.lebans.com both have free, downloadable calendars that use only
Access' built-in features and functions. They, too, work and do not require
an ActiveX.

Larry Linson
Microsoft Access MVP


  #6  
Old June 18th, 2006, 12:25 AM
david epsom dot com dot au
Guest
 
Posts: n/a
Default Re: Compiler error: A module is not a valid type.

Do you have a module called Calendar or ComboBox?

In case, you should fully describe the declarations:

'Dim cboOriginator As access.ComboBox
Public Sub setDate( _
cboDateComponent As access.ComboBox, _
ocxCalendar As ?????.Calendar, _
cboOriginator As Access.ComboBox)

(david)

"swingingming" <ming.mge@gmail.com> wrote in message
news:1150433663.171888.155610@g10g2000cwb.googlegr oups.com...[color=blue]
> Hi, When i try to set calendar value, i got such error. the parameters
> are: (cboDateComponent As ComboBox, ocxCalendar As Calendar)
> Thank you.
>[/color]


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,840 network members.