% datatype

BryanT

Registered User.
Local time
Tomorrow, 10:30
Joined
Mar 8, 2005
Messages
25
I have some access97 code that uses dim statements such as

Dim i%, DoIt%, FirstTab%

Is this just another method for declaring variant datatypes? (each variable
holds a different type)
 
Bryan,

Those are integers. To declare a variant:

Dim v

or

Dim v as variant

Regards,
Tim
 
These methods used to be used years ago. The only ones I can remember are:

Dim a% (Dim a As Integer)
Dim a$ (Dim a As String)
Dim a# (Dim a As Double)
 
Thanks

Thanks to SJ McAbney and Pono1

i% and FirstTab% both take integer values as you said, but what confused me was that the 'DoIt%" variable seems to take boolean values.

Thanks again,
Bryan
 
Boolean values are either False (0) or True (-1) which are both whole numbers and can comfortable be assigned to an Integer.
 
BryanT said:
I have some access97 code that uses dim statements such as

Dim i%, DoIt%, FirstTab%

Is this just another method for declaring variant datatypes? (each variable
holds a different type)
It would be better to define them fully. I'm not sure this old syntax is accepted in access, and it is a waste to use variable. This syntax is old we’re talking before visual languages.
 
Thanks All. You are correct in that this is very old code and that there are better ways to declare variables, but at present the owner of the app is happy with it and as such doesn't want to alter/modify/improve it. I am just trying to get an understanding of the code so in the event of problems I can sort them out.

Regards,
Bryan
 

Users who are viewing this thread

Back
Top Bottom