creativefusion
asked on
Data Type Declaration Statements
All,
I am still getting my feet wet with devlopment so bare with me please!!
An easy question for you all I hope?
Can I declare mutiple variables and associated data types on one line of code in Access VBA?
I have enclosed a sample for you to see what I am doing.
CF
I am still getting my feet wet with devlopment so bare with me please!!
An easy question for you all I hope?
Can I declare mutiple variables and associated data types on one line of code in Access VBA?
I have enclosed a sample for you to see what I am doing.
CF
Dim vMAID As Long, vPodStateCode as Integer, vRefNo As Long, vDestLocNo As Long
Yes, that is a correct way of doing the declaration
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Dim vMAID As Long, vPodStateCode as Integer, vRefNo As Long, vDestLocNo As Long
Just noting ... when you do all the declarations on a single, be *sure* you data type each variable ... as you have done.
mx
ASKER
Thanks guys.
So I couldn't do this right?
Dim vRefNo, vMAID as Long, vStateCode as Integer, vTest as String
Note: Both vRefNo and vMAID are Long data types...
CF
So I couldn't do this right?
Dim vRefNo, vMAID as Long, vStateCode as Integer, vTest as String
Note: Both vRefNo and vMAID are Long data types...
CF
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Perfect as expected.
Thanks guys.
Shaun
Thanks guys.
Shaun
you are welcome ..
mx
mx
creativefusion,
your question states
<Can I declare mutiple variables and associated data types on one line of code in Access VBA? >
and that is already answered in http:#a35135077
your question states
<Can I declare mutiple variables and associated data types on one line of code in Access VBA? >
and that is already answered in http:#a35135077
ASKER
Hi Caps,
Mate, I aksed the original question and yes you answered it correctly first off. However, as a VB newbee ( and you know I am because you have answered many of my previous posts), we both know how dynamic programming can be to a blind man, so the question changed as I found an issue with another possible scenario beyond my initial post.
DatabseMX answered the additional questions I posted hense the reason why I awarded the most points to him.
Is it really supposed to be so confronting for a learner on EE?
Kind regards,
Shaun
Mate, I aksed the original question and yes you answered it correctly first off. However, as a VB newbee ( and you know I am because you have answered many of my previous posts), we both know how dynamic programming can be to a blind man, so the question changed as I found an issue with another possible scenario beyond my initial post.
DatabseMX answered the additional questions I posted hense the reason why I awarded the most points to him.
Is it really supposed to be so confronting for a learner on EE?
Kind regards,
Shaun
<Is it really supposed to be so confronting for a learner on EE?>
no, but there are rules to be followed, (first correct answer gets the accepted answer)
no, but there are rules to be followed, (first correct answer gets the accepted answer)