Access 2000 compiler problem

  • Thread starter John Melbourne news
  • Start date
J

John Melbourne news

Possible Access 2000 Visual Basic Bug

I have an access database with a reasonable quantity of VB code behind the
forms.

One event sequence requires opening a text file and reading a few hundred
characters. I was getting 'runtime error 458 -- variable uses an
automation type not supported in visual basic'

Since I had used that particular bit of code in other places without any
problem I tried to find out what was causing it. The result is very odd
indeed.


I normally declare all variables at the top of a code page:
Including the line:-

Dim aaA, bbB, ccC As String

resulted in the error 458 when attempting to open the text file but using
the two lines:-

Dim aaA, bbB As String
Dim ccC As String

worked with no problem!

Can anyone explain

John Melbourne
 
6

'69 Camaro

Hi, John.
Dim aaA, bbB, ccC As String

resulted in the error 458 when attempting to open the text file

aaA and bbB are declared as Variants. ccC is declared as a String data
type.
Dim aaA, bbB As String
Dim ccC As String

worked with no problem!

aaA is declared as a Variant, but bbB and ccC are declared as String data
types. You haven't shown how these variables are used in your code, but I
suspect you were having the problem with bbB. Were you not?

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
info.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top