Results 1 to 13 of 13
  1. #1
    New Lounger
    Join Date
    Sep 2003
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Access Error (2000)

    Hi ,

    I appear to be getting an access error , but cannot work out for the reason for the error.

    I would appreciate it if you could inform me as to how l could go about resolving the error message l am getting.


    Thanks
    Justin
    Attached Images Attached Images

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Access Error (2000)

    What is the error message you're getting? You've shown us a location but not told us what the error is. Is Str is breaking because of a bad reference?
    Charlotte

  3. #3
    New Lounger
    Join Date
    Sep 2003
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access Error (2000)

    Yes, this is the case.

    What l am trying to do is to use a drop down list to try and retrieve document number details from a table.
    If you see the example you will see what l mean.

    It works ok in all other forms and table but l am baffled as to what is causing this error when l try and create a drop down menu.

    Regards
    Justin
    Attached Images Attached Images

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Access Error (2000)

    In the Visual Basic Editor, select Tools | References...
    If there is a reference starting with MISSING, write down which one it is, then clear its check box.
    Repeat if necessary for other references.
    Click OK.
    Try Debug | Compile <project> to see if the problem has gone away. If not, you may have to hunt for the file(s) noted as missing, then set new references.

  5. #5
    New Lounger
    Join Date
    Sep 2003
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access Error (2000)

    The error still is there after trying what you mentioned.

    I don't understand what you mean by new references, repeat if necessary for other references and missing file(s).
    Can you explain what you mean by these things?

    Thanks
    Justin

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Access Error (2000)

    Did you have any missing references, and if so, what were they?

    A reference tells VBA to use a set of objects, properties, methods etc. For example, if you use Access to control Word, you need a reference to the Word object library. Sometimes, these references don't work any more, for example because new software has been installed, or because the database is opened from another PC, with a different setup. Non-working references are marked MISSING: in the Tools | References... dialog.

  7. #7
    New Lounger
    Join Date
    Sep 2003
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access Error (2000)

    Please can you tell how l can go about resolving this issue of missing referenes.

    When you mean different setup , what sort of setup are you implying?
    what can l check in the setup order to resolve this problem of a different setup?

    Regards
    Justin

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Access Error (2000)

    You still haven't told me if there WERE any missing references, and if so, which ones they were.

  9. #9
    New Lounger
    Join Date
    Sep 2003
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access Error (2000)

    I don't understand what you mean by missing references.

    I have attached the references which l have ticked in the check box.

    Regards,
    Justin
    Attached Images Attached Images

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Access Error (2000)

    As I wrote in <post#=342702>post 342702</post#>, "Non-working references are marked MISSING". Your screenshot doesn't show any reference as MISSING. If you haven't cleared the check box for any of the references since you got the error, missing references are NOT the cause of your problem.

    So we get back to Charlotte's question in the first reply in this thread: "What is the error message you're getting? You've shown us a location but not told us what the error is."

  11. #11
    3 Star Lounger
    Join Date
    Jul 2001
    Location
    Minneapolis, Minnesota, USA
    Posts
    299
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access Error (2000)

    Just a suggestion here, but if your combo box is alpha-numeric (which, according to your form sample it appears to be) then the STR() function is trying to make a string out of a string and, although A97 wasn't too picky about this, A2K might take issue with it. Have you tried removing the STR() and seeing if this helps?
    Carpy Diem, it&#39;s .

  12. #12
    Bronze Lounger
    Join Date
    Nov 2001
    Location
    Arlington, Virginia, USA
    Posts
    1,394
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: Access Error (2000)

    If whatever is in Combo21 is not a number, do not use Str function. The Str function is used to convert a number to a string. If the data being evaluated is not numeric, you'll get a Type Mismatch error (Err 13). For example, if the combobox illustrated in screen shot is Combo21, this expression:

    ? Str("GH/L/400")

    results in Type Mismatch error. Also, Str is a somewhat archaic function - if the return value is a positive number, the string returned by function includes a leading space for the sign of the number. The recommended newer functions to use in place of Str are the CStr or Format functions. Recommend either eliminate Str if Combo21 value is not numeric, or use CStr in place of Str so you don't get the leading space. Example from Immediate window:

    <pre>? Str(400), Len(Str(400))
    400 4
    ? CStr(400), Len(CStr(400))
    400 3</pre>


    Note leading space returned by Str, and difference in length. This may cause errors if using value to locate a record.

    HTH

  13. #13
    New Lounger
    Join Date
    Sep 2003
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access Error (2000)

    This appeared to resolve the problem and the form is now working.

    Many thanks for your help.

    Justin.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •