Results 1 to 10 of 10
  1. #1
    msmit8 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2014
    Posts
    14

    Pop up box needed

    Line_of_Business field list contains:


    ·AUDIT
    ·COMMERCIAL LINES
    ·PERSONAL LINES
    ·CLAIMS DEDUCTIBLE

    I would like to have a message pop up whenAUDIT is selected from the Line_of_Business field. The message will remindfolks to make sure something is completed. Is there a way to add a pop upmessage with these conditions?

    Thanks for your help!



  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    Sure, in the after update event of the combo:

    Code:
    If Me.ComboName = "Audit" Then
      MsgBox "Whatever"
    End If
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    msmit8 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2014
    Posts
    14
    Do I need a macro in order to do what you are suggesting? See this message:

    Click image for larger version. 

Name:	Error.PNG 
Views:	19 
Size:	10.5 KB 
ID:	18764

    This is what my expression looks like in the After Update line of the Combo Box properties menu.

    Click image for larger version. 

Name:	Expression Builder.PNG 
Views:	19 
Size:	25.3 KB 
ID:	18765

    Any tips on what I'm doing wrong.

    Thanks for all your help. Much appreciated!

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    What I posted was VBA code:

    http://www.baldyweb.com/FirstVBA.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    msmit8 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2014
    Posts
    14
    Perfect. That worked. Thank you very much!

  6. #6
    msmit8 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2014
    Posts
    14
    Spoke too soon.

    I'm getting a error message:

    "This form or report contains changes that are incompatible with the current database format. The form or report was not saved.

    In order to save your changes, you must remove any layouts that have empty cells in them and/or set the HasModule property for the form or report to No."

    Here is a screen shot my code:

    Click image for larger version. 

Name:	Code Box.PNG 
Views:	17 
Size:	30.7 KB 
ID:	18768

    Thanks again for your help!

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    That's really basic code that should work in any version. Could there be something else that was changed?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  8. #8
    msmit8 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2014
    Posts
    14
    No. Could it have something to do with the Line_of_Business field being set up as a Table/Query. So all of the options below point back to a separate table.

    AUDIT
    COMMERCIAL LINES
    PERSONAL LINES
    CLAIMS DEDUCTIBLE


  9. #9
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,602
    Related thread https://www.accessforums.net/access/...ded-48402.html. I expect will have the same issue with code in that thread.

    Sounds like you are using lookups with alias in table. Advise not to do that. http://access.mvps.org/access/lookupfields.htm

    If the actual value of field is an ID, not the descriptive ("Audit", etc), then the code needs to use the ID as parameter.

    If Me.Line_Of_Business = 1 Then

    And combobox needs to include the ID as a column in the RowSource.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  10. #10
    msmit8 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2014
    Posts
    14
    Thanks for all your help. This thread is now closed.

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

Similar Threads

  1. A help needed...!
    By prabhakarpeje in forum Reports
    Replies: 30
    Last Post: 04-19-2014, 10:07 AM
  2. Help needed : Library catalogue in access format is needed
    By dealers in forum Sample Databases
    Replies: 3
    Last Post: 01-16-2014, 02:03 PM
  3. Help Needed
    By sdecaire in forum Access
    Replies: 2
    Last Post: 11-11-2011, 03:07 PM
  4. Help needed
    By longbo43 in forum Access
    Replies: 3
    Last Post: 09-27-2010, 10:18 AM
  5. Help needed...
    By Pazz in forum Access
    Replies: 0
    Last Post: 11-02-2009, 06:59 PM

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