Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Apr 2004
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Left() function error(2000/xp)

    Hi,

    I was wondering why this code works on my machine but not my friends machine or my customers. their machines say they are missing these files mscomct2.ocx and wkcalctl.dll ... mscomct2.ocx I installed in the system files of their machines but it still doesn't work .. the other file is a MS works file. The Left( ) function generates an error .

    txtClientCode.Value = Left([FirstName], 1) & Left(Me![LastName], 1) & Format(Me![Birthdate], "mmddyy") & " - " & Me.txtfamcode
    Gem <img src=/S/bash.gif border=0 alt=bash width=35 height=39>

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

    Re: Left() (2000/xp)

    First, register mscomct2.ocx:
    Select Start | Run... (in Windows, not in Access)
    Type regsvr32 mscomct2.ocx and press Enter.

    In the Access Visual Basic Editor, select Tools | References...
    You will probably see some references starting with MISSING.
    Write down which ones they are, then clear the check boxes for the missing references, and click OK.
    Select Debug | Compile <projectname>.

    Do you get syntax errors? If not, you're in luck. If you get error messages about undefined types, you may have to add a reference again - that for wkcalctl.dll seems rather unlikely in an Access database; mscomct2.ocx is possible. You can set a reference in Tools | References...; click the Browse... button to locate the file if necessary.

  3. #3
    New Lounger
    Join Date
    Apr 2004
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Left() (2000/xp)

    So the left function should work in access. and the only reason it wouldnt is if you are missing a reference

    And also thank you

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

    Re: Left() (2000/xp)

    If one of the "simple" functions, such as Left or Year, fails to work, it is almost always caused by a missing reference. It is not necessarily the only possible explanation, but it's the first that comes to mind.

Posting Permissions

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