Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Atlanta
    Posts
    568
    Thanks
    7
    Thanked 1 Time in 1 Post

    Can't find project or library (XP)

    I have an Access database that I run on three different machines. Two of these machines run Windows XP and one runs Windows ME. All three run Access XP. When I change the database on one machine, I copy it to a memory stick to update the two other machines. Two of the machines run this database just fine. The third, and newest machine, chokes when I try to enter the date in a date field of a form.

    The form runs a macro that lets me use some shortcuts to enter and increase the date. On this new machine, I get the error "Can't find project or library..." and it brings up the beginning of this macro. Since it works on the other machines and I copy the database between machines, I assume the problem is something external to the database itself but I have no luck figuring it out. Any suggestions?

    Ronny

    PS: Glad you are back up, we missed you.


    Public Sub DateKey(ctl As Control, KeyAscii As Integer, Optional Interval)
    'Called from keypress event of a textbox bound to a date/time field
    'Pressing 't' fills the textbox with today's date
    'Pressing '+' or '-' increments or decrements current value
    'Default interval is 1 day

    Dim Increase As Integer

    If IsMissing(Interval) Then Increase = 1 Else Increase = Interval
    Select Case Chr$(KeyAscii)
    Case "+"
    ctl = DateAdd("d", Increase, ctl)
    KeyAscii = 0
    Case "-"
    ctl = DateAdd("d", 0 - Increase, ctl)
    KeyAscii = 0
    Case "t", "T"
    ctl = Date
    KeyAscii = 0
    Case "d"
    ctl = DateAdd("d", 1, ctl)
    KeyAscii = 0
    Case "w"
    ctl = DateAdd("d", 7, ctl)
    KeyAscii = 0
    Case "m"
    ctl = DateAdd("d", 30, ctl)
    KeyAscii = 0
    Case "y"
    ctl = DateAdd("d", 365, ctl)
    KeyAscii = 0
    Case "D"
    ctl = DateAdd("d", 0 - 1, ctl)
    KeyAscii = 0
    Case "W"
    ctl = DateAdd("d", 0 - 7, ctl)
    KeyAscii = 0
    Case "M"
    ctl = DateAdd("d", 0 - 30, ctl)
    KeyAscii = 0
    Case "Y"
    ctl = DateAdd("d", 0 - 365, ctl)
    KeyAscii = 0
    Case Else
    End Select

    End Sub
    Ronny Richardson

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

    Re: Can't find project or library (XP)

    Open the database on the Windows ME machine, holding down the Shift key to bypass the startup options.
    Press Alt+F11 to activate the Visual Basic Editor.
    Select Tools | References...
    Look at the references at the top of the list whose check boxes are ticked.
    Is there one or more starting with MISSING?
    If so, do the following:
    - Write down the names of the MISSING references.
    - Clear their check boxes.
    - Click OK.
    - Select Debug | Compile <projectname>
    If you don't get an error message, you're probably done - the database should work OK now.
    If you get messages about undefined user-defined types:
    - Select Tools | References... again.
    - Scroll down until you see the references you wrote down (but without the word MISSING).
    - Tick their check boxes.
    - Click OK.

  3. #3
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Atlanta
    Posts
    568
    Thanks
    7
    Thanked 1 Time in 1 Post

    Re: Can't find project or library (XP)

    This worked. Thank you very much.


    Ronny
    Ronny Richardson

Posting Permissions

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