Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Access 2000 compiler problem

Discussion in 'Information Technology' started by John Melbourne news, Jul 28, 2006.

  1. John Melbourne news

    John Melbourne news
    Expand Collapse
    Guest

    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
     
  2. Loading...


  3. '69 Camaro

    '69 Camaro
    Expand Collapse
    Guest

    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.


    "John Melbourne news" <john@johnmelbourne.co.uk> wrote in message
    news:BVo8g.5712$pj4.3948@newsfe1-win.ntli.net...
    > 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
    >
    >
    >
     

Share This Page