Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Zero allowed in arrays??

Status
Not open for further replies.

Toby1kenobe

Instructor
May 26, 2002
66
0
0
GB
Dear All

I'm new to arrays and am having reasonable success. The problem i'm having is trying to write zero to an array variable, like:

sanctionarray(0) = Forms![points input].Check1

where check1 is a check box (and therefore i need to use zero)

by the way sanctionarray is set as byte, could this cause problems??

Thanks
Toby
 
Toby1kenobe

Hello there, The problem as you state is not with your array but with the type your array is set to. A Byte has a value of 0 - 255. While a checkbox has one of three values 1) Null - The check box is neither on or off 2) 0 - The check box is not set 3) -1 - the CheckBox is checked.

Neither null nor -1 values can be set to a Byte Variable even a array variable.

Hope it helps

UrbaneRove
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top