Results 1 to 2 of 2
  1. #1
    chasm58 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Sep 2016
    Posts
    4

    Conditional Macro to add MsgBox when Subform Field is blank

    I have a form with a linked subform.
    The subform is populated from a query to a table with a field that may or may not be unpopulated.
    I want to pop up a message when the subform is being populated from a combobox when this field is unpopulated.
    I think I need an after update event on the subform.
    Or, does the macro have to reference the field from the table from which the query is looking for it?


    Any help would be appreciated.

  2. #2
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2013 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    The event occurs when the combobox changes, so that would be your AfterUpdate. Where is the combobox, on the subform or on the main form? That would determine where you would look for the value - in the first case you can look at the value on the subform, in the latter case you could do a dlookup on the subform's recordsource.

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

Similar Threads

  1. Macro for visible field in subform
    By g=2012 in forum Access
    Replies: 7
    Last Post: 09-11-2012, 02:23 PM
  2. Replies: 1
    Last Post: 04-26-2012, 08:31 PM
  3. conditional msgbox in a control
    By raton in forum Forms
    Replies: 6
    Last Post: 03-29-2012, 09:43 AM
  4. Replies: 1
    Last Post: 07-20-2011, 01:24 PM
  5. Replies: 20
    Last Post: 02-17-2010, 12:12 PM

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