VB: Type incompatibility error!?

  • Thread starter Thread starter Jerome
  • Start date Start date
J

Jerome

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
 
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 <--
 
Hi, thanks for answering. I'll check all of that! Should I still have
problems then I'll come back here ...
 
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
 

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

Back
Top