Results 1 to 4 of 4
  1. #1
    tcheck is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Nov 2010
    Posts
    131

    Display message when a subform is clicked on.


    I have a form that has a subform that I want to display a message if a user clicks on it that it is no longer used for data input. The On Click event works if the user clicks in the top left corner. I have tried the On Got Focus and On Dirty does not pop up the message. Where should I put the command?

    Thank you in advance.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    rather than create a popup message,
    just put a label on the form that is either visible or not. That has your message.
    then the only code is when the user goes to the record...
    Code:
    sub form_OnCurrent()
    lblMsg.visible  = me.subform.locked
    end sub

  3. #3
    tcheck is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Nov 2010
    Posts
    131
    I give them an option to open up 2 other forms depending what kind of producer the employee is, hre is the code,

    If Forms![frm_Producer]![Code] = "Sales" Then
    If MsgBox("Changes to MMID's and Symbols are no longer entered in the Producer form, would you like to open the Money Manager form?", vbYesNo, "Client Prompt") = vbYes Then
    DoCmd.OpenForm "frm_MMID_Active", acViewNormal, acEdit
    End If
    End If


    If Forms![frm_Producer].[Code] = "Analyst" Then
    If MsgBox("Changes to Symbols are no longer entered in the Producer form, would you like to open the Symbol Manager form?", vbYesNo, "Client Prompt") = vbYes Then
    DoCmd.OpenForm "frm_SymbolList_All", acViewNormal, acEdit
    'Else
    'MsgBox "The user status has NOT been changed"
    End If
    End If

  4. #4
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2013 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Set the subform to Locked in the If statement above.

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

Similar Threads

  1. display a message in a text box
    By mmaule in forum Access
    Replies: 2
    Last Post: 02-18-2015, 11:14 AM
  2. Replies: 3
    Last Post: 01-20-2014, 04:55 PM
  3. Replies: 3
    Last Post: 09-14-2012, 03:35 PM
  4. How to display message
    By Trojnfn in forum Access
    Replies: 5
    Last Post: 10-20-2011, 12:13 PM
  5. How to display a Message
    By seb in forum Queries
    Replies: 7
    Last Post: 05-27-2011, 11:33 AM

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