PC Review


Reply
Thread Tools Rate Thread

declaring a variable as "Index" turned out into "index"

 
 
rocco
Guest
Posts: n/a
 
      1st Mar 2010
Hello,
it can sounds weird but I'm stocked into trying to declaring a variable as
index.
Immediately after digitizing the statement it changes "Index" into "index"
and the code will not work.
I need the variable to iterate through the Indexes collection of a Dao
recordset.
This recordset is opened as dbOpenTable and until now I have created one
index only, the primary key, when I built the table.
The DAo 3.6 library has been correctly referenced.
What's wrong?
Thanks,
Rocco

 
Reply With Quote
 
 
 
 
rocco
Guest
Posts: n/a
 
      1st Mar 2010
sorry... I made a mistake... I clicked on "usefull" but actually it hasn't
solved my problem.

The *thing* is that I would like to get
dim idx as Index (or DAO.Index)

but instead I get
dim idx as index (or DAO.index)

thanks!
rocco
"coasterman via AccessMonster.com" wrote:

> If I understand your post correctly, instead of:
>
> Dim index as Index
>
> which is what I suspect you are trying to do (and running fould of the editor
> quirks, declare is as follows:
>
> Dim index as DAO.Index
>
> This way the variable name stays lower case.
>
> Cheers
>
> rocco wrote:
> >Hello,
> >it can sounds weird but I'm stocked into trying to declaring a variable as
> >index.
> >Immediately after digitizing the statement it changes "Index" into "index"
> >and the code will not work.
> >I need the variable to iterate through the Indexes collection of a Dao
> >recordset.
> >This recordset is opened as dbOpenTable and until now I have created one
> >index only, the primary key, when I built the table.
> >The DAo 3.6 library has been correctly referenced.
> >What's wrong?
> >Thanks,
> >Rocco

>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/For...dules/201003/1
>
> .
>

 
Reply With Quote
 
RD
Guest
Posts: n/a
 
      3rd Mar 2010
I see you've fixed one thing: it's never a good idea to use reserved
words as variable names.

I tried what you did, I declared a variable:
Dim index as DAO.Index

And it gave me the same this as your's. Even after I deleted the bad
declaration and typed a new one, the code window kept returning index
instead of Index.

I haven't taken it any further than that but I suspect that you've
taught VBA a new type of index. I had to open a different db before
the code window would give me a proper Index. You just might have to
create a new module and copy over everything except for the bad
declaration before it starts working correctly.

Good luck,
RD


On Mon, 1 Mar 2010 06:43:01 -0800, rocco
<(E-Mail Removed)> wrote:

>sorry... I made a mistake... I clicked on "usefull" but actually it hasn't
>solved my problem.
>
>The *thing* is that I would like to get
>dim idx as Index (or DAO.Index)
>
>but instead I get
>dim idx as index (or DAO.index)
>
>thanks!
>rocco
>"coasterman via AccessMonster.com" wrote:
>
>> If I understand your post correctly, instead of:
>>
>> Dim index as Index
>>
>> which is what I suspect you are trying to do (and running fould of the editor
>> quirks, declare is as follows:
>>
>> Dim index as DAO.Index
>>
>> This way the variable name stays lower case.
>>
>> Cheers
>>
>> rocco wrote:
>> >Hello,
>> >it can sounds weird but I'm stocked into trying to declaring a variable as
>> >index.
>> >Immediately after digitizing the statement it changes "Index" into "index"
>> >and the code will not work.
>> >I need the variable to iterate through the Indexes collection of a Dao
>> >recordset.
>> >This recordset is opened as dbOpenTable and until now I have created one
>> >index only, the primary key, when I built the table.
>> >The DAo 3.6 library has been correctly referenced.
>> >What's wrong?
>> >Thanks,
>> >Rocco

>>
>> --
>> Message posted via AccessMonster.com
>> http://www.accessmonster.com/Uwe/For...dules/201003/1
>>
>> .
>>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FrontPage publishing error - "index.htm" renamed to "index.html" Gary Microsoft Frontpage 1 8th Jan 2008 11:25 PM
Setting up an index directory in a Word doc does NOT work / "No index entries found" Goran Ivanic Microsoft Word New Users 1 27th Oct 2006 04:48 PM
Setting up an index directory in a Word doc does NOT work / "No index entries found" Goran Ivanic Windows XP General 2 27th Oct 2006 04:48 PM
Setting up an index directory in a Word doc does NOT work / "No index entries found" Goran Ivanic Windows XP Help 2 27th Oct 2006 04:48 PM
Setting up an index directory in a Word doc does NOT work / "No index entries found" Goran Ivanic Microsoft Word Document Management 1 27th Oct 2006 04:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:35 PM.