Results 1 to 9 of 9
  1. #1
    5 Star Lounger
    Join Date
    Jan 2004
    Location
    Norfolk, England
    Posts
    744
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Controls v Icons (2000)

    Hi,

    Does anyone know of any issue with placing .ico files on controls?

    I placed one on a control with an event of

    Application.Quit

    on it, but the event doesn't work....................I'm puzzled!

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

    Re: Controls v Icons (2000)

    What do you mean by "I placed one (i.e. an icon) on a control"? What kind of control? How did you put an icon on it? What kind of event?

  3. #3
    5 Star Lounger
    Join Date
    Jan 2004
    Location
    Norfolk, England
    Posts
    744
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Controls v Icons (2000)

    I placed a standard control on a form.
    This specific one is for an application quit command. I inserted it from the Toolbar in the normal way, and selected its function. The coding obviously is decided through the 'wizard'.
    Instead of a bitmap image I placed a Icon on it, by going onto Browse, in the properties of the control.
    However, I've managed to solve the problem through changing the coding behind the control. I was just surprised that this had to be done in the first place.

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

    Re: Controls v Icons (2000)

    Since you didn't explain exactly what problem you had with the icon and what you did to fix it, we can't explain what happened. Please share more detail so that anyone else who might try this will know what to watch out for.
    Charlotte

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

    Re: Controls v Icons (2000)

    Removing the error handling in itself should not cause the command button to start working correctly. But we'll probably never find out what did.

    For the future: from the name CmdExit I gather that your control is a command button. You didn't make that clear in your earlier posts in this thread, although I asked what kind of control you used. When asking for help, you should try to provide specific information - "a command button" tells us a lot more than "a control", since "a control" can be a label or a text box or an image control or an OLE control or ...

  6. #6
    5 Star Lounger
    Join Date
    Jan 2004
    Location
    Norfolk, England
    Posts
    744
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Controls v Icons (2000)

    Point taken.......... naturally I meant a command button <img src=/S/sorry.gif border=0 alt=sorry width=15 height=15>

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

    Re: Controls v Icons (2000)

    I don't see an Application.Quit in there anywhere. Isn't that what you specified in your initial post?
    Charlotte

  8. #8
    5 Star Lounger
    Join Date
    Jan 2004
    Location
    Norfolk, England
    Posts
    744
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Controls v Icons (2000)

    Sure, instead of using the bmp images as assigned by access on the control, I placed a .ico file on it.
    However, when clicking on the control the coding behind it, in the case, the standard coding added by Access, didn't execute:

    <hr>Private Sub CmdExit_Click()
    On Error GoTo Err_CmdExit_Click
    Application.Quit
    Exit_CmdExit_Click:
    Exit Sub
    Err_CmdExit_Click:
    MsgBox Err.Description
    Resume Exit_CmdExit_Click


    End Sub<hr>

    By removing the error commands (in bold), the coding seemed to work................however I do not know if this is right!

  9. #9
    5 Star Lounger
    Join Date
    Jan 2004
    Location
    Norfolk, England
    Posts
    744
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Controls v Icons (2000)

    Shoot me know....... <img src=/S/brainwash.gif border=0 alt=brainwash width=15 height=15> . Duly edited..........

Posting Permissions

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