Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / June 2007

Tip: Looking for answers? Try searching our database.

VB: Type incompatibility error!?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jerome - 29 Jun 2007 09:40 GMT
Hello,

I've got the following code in one of my forms:

If Me.dispo.Value < 0 Then
    Me.dispo.ForeColor = "255"
Else: Me.dispo.ForeColor = "000"
End If

This works fine on all of my computers except ONE. On this one I get a
runtime error 13: Type incompatibility.

But I don't see why? And all of the PCs are using Access 2003.

Does anyone have an idea how to resolve this?

Any help is greatly appreciated,

Jerome
Stefan Hoffmann - 29 Jun 2007 09:47 GMT
hi Jerome,

> I've got the following code in one of my forms:
> If Me.dispo.Value < 0 Then
>     Me.dispo.ForeColor = "255"
> Else: Me.dispo.ForeColor = "000"
> End If
The Color values are Long Integers. Don't use : in structures.

  If Me.dispo.Value < 0 Then
     Me.dispo.ForeColor = 255
     Else
     Me.dispo.ForeColor = 0
  End If

Take also a look at the RGB() function.

> This works fine on all of my computers except ONE. On this one I get a
> runtime error 13: Type incompatibility.
> But I don't see why? And all of the PCs are using Access 2003.
Compare the service packs. Is dispo a standard Access control or an
ActiveX control? If it is an ActiveX or third party control, check if
the are of the same version.

mfG
--> stefan <--
Jerome - 29 Jun 2007 10:37 GMT
Hi, thanks for answering. I'll check all of that! Should I still have
problems then I'll come back here ...

>> I've got the following code in one of my forms:
>> If Me.dispo.Value < 0 Then
[quoted text clipped - 20 lines]
> mfG
> --> stefan <--
Jerome - 29 Jun 2007 10:43 GMT
I got right of the " and the : (I'm not sure why I used them in the
first place ...) and now it also works on the one machine!

Thanks a lot :)

Jerome

> hi Jerome,
>
[quoted text clipped - 22 lines]
> mfG
> --> stefan <--
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.