Re: Declaring variables - basic question
- From: "Brian Wilson" <bwilson@xxxxxxxxxx>
- Date: Thu, 2 Mar 2006 14:27:55 -0000
"Brendan Reynolds" <brenreyn@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:u3XAwqePGHA.3408@xxxxxxxxxxxxxxxxxxxxxxx
The latter.
In some languages, including VB.NET, you can declare multiple variables in
this way, specifying the type only once at the end of the line, but in
'classic' VB and VBA you need to specify the type of each variable, or, as
you say, Variant will be used by default.
--
Brendan Reynolds
Access MVP
"Will" <Will5435THISGOES@xxxxxxxxxxx> wrote in message
news:46o23gFc45i9U1@xxxxxxxxxxxxxxxxx
I have found a number of instances in the database I have inherited where
variables have been declared "Dim rs, rh, Dt As Recordset". Does this
mean that rs, rh and Dt are all declared as recordsets or has the previous
programmer misunderstood and rs, rh are actually variants and dt is a
recordset?
Thanks in advance
To the OP:
And if you are going to correct this mistake, you may as well specify the
object library while you're at it. In other words, change:
Dim rs As Recordset
to either
Dim rs As DAO.Recordset
or
Dim rs As ADODB.Recordset
depending on which was intended.
.
- References:
- Declaring variables - basic question
- From: Will
- Re: Declaring variables - basic question
- From: Brendan Reynolds
- Declaring variables - basic question
- Prev by Date: Re: Declaring variables - basic question
- Next by Date: Re: Sending data to Word or Excel
- Previous by thread: Re: Declaring variables - basic question
- Index(es):
Relevant Pages
|