Results 1 to 3 of 3
  1. #1
    Tall_Paul is offline Novice
    Windows Vista Access 2010 64bit
    Join Date
    Feb 2018
    Posts
    3

    Lightbulb Unsure how to add a picture or icon that will load a pop-up notes windows when clicked

    I'm pretty new to Access, so this may seem like an easy answer for many but here is the situation:



    I have a table called Scott's Music Which contains all of the information in the database. There is a field in this table called Notes of the memo data type. I have created a form called SMForm which displays most of the information from the table. Because of the compact nature of the form I have no room to add a textbox to display the text in the Notes field. So I thought it would be useful if I could simply add a small picture or icon that, when clicked. would popup a small window to view or edit the notes. Additionally, I wanted the picture or icon to be redmemo.jpg if there wasn't already existing notes in the Notes field and greenmemo.jpg if there were existing notes for that record.

    I'm sure this can be done, but since I only have rudimentary knowledge of VBA coding or macros I would really appreciate the guidance of a more knowledgeable user.

    Thank you.

    -Paul

  2. #2
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    Add the Notes field as a small hidden control.
    Create a separate popup form to display the Notes.

    On the main form, add this to the form current event

    Code:
    if Me.Notes<>"" Then
    .  Me.mybuttonName.Picture= ..... enter full path to greenmemo.jpg here
    Else
     ...similar code for redmemo.jpg
    End if
    The button itself click code would open your popup form.

    However a better method is to enable / Disable the button

    Code:
    if me.notes<>"" then
    . Me.buttonnwme.enabled=true 
    Else
    . Me.buttonname.enabled=false
    End If
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  3. #3
    Gicu's Avatar
    Gicu is offline VIP
    Windows 8 Access 2013
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,250
    Hi there,


    Have you considered using a text box to show if you have notes, you can then use conditional formatting to show Yes in red and No in green. I am also attaching a sample db I did awhile ago to show you how to use a pop-up editor form (hint : I use the double-click event of the text box to open the pop-up for that field).
    Click image for larger version. 

Name:	Notes.png 
Views:	8 
Size:	59.0 KB 
ID:	32486

    Cheers,
    Vlad
    Attached Files Attached Files

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 01-11-2016, 08:50 AM
  2. Replies: 7
    Last Post: 06-18-2012, 11:31 AM
  3. Replies: 3
    Last Post: 05-31-2012, 02:49 PM
  4. Replies: 0
    Last Post: 12-06-2011, 11:01 AM
  5. Can't Load a picture from the table
    By dada in forum Reports
    Replies: 1
    Last Post: 09-18-2010, 10:17 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums