unbound chkboxes giving different values

alaric

Registered User.
Local time
Today, 15:43
Joined
Sep 6, 2004
Messages
50
Hi,

example: some of them giving back a value of "0" while another FALSE.
There are all unbound chkboxes on a form. I checked a 1000 times if the default value of these chkboxes were different (i tried 0 aswel as False) No difference

Im confused. When I thought I got it....
I hope someone has a clearer mind then I have..
this is a part of my code

Dim chkStudent, chkShowgroup As Boolean
Dim chkMonday, chkTuesday, chkWednesday as Boolean

chkStudent = Me!chkStudent.Value
chkMonday = Me!chkMondag.Value
chkTuesday = Me!chkTuesdag.Value
chkWednesday = Me!chkWednesday.value

Please help; this drives me insane
 
Dim chkStudent As Boolean
Dim chkShowgroup As Boolean
Dim chkMonday as Boolean
Dim chkTuesday as Boolean
Dim chkWednesday as Boolean

???
kh
 
whats the difference?

Hi

whats the difference in your way of declaration and mine?
I thought that my way is also possible, but (for me) easier to read.

What you want to tell me with the questionmarks?
 
??? = Does it work when you try the above suggestion?

kh
 
thx

Hi

Yes this work as I want it to!!!
the return values are now false and/ or True

How is this possible? whats is wrong in my style of declaration?
or is just not working?

many thanks
A
 
If I'm not mistaken this has something to do with 'Option Explicit' but I'm not sure. Anyway, I think in:

Dim chkStudent, chkShowgroup As Boolean

chkStudent dims as a string if you don't declare it as Boolean.



Cool - Glad it's working.
kh
 

Users who are viewing this thread

Back
Top Bottom