Solved

Trying to make a message box appear if certian criter exists

Posted on 2014-01-16
2
343 Views
Last Modified: 2014-01-18
I have a form (form #1), which contains a field named txtGrowDaysCalc.

And in that form I have a subform named subfrmReady.  When Form #1 opens and if the field txtGrowDaysCalchas no data in it then I want a message box to appear before the user can enter data in the subform.

Here is my onopen event of the subform which isn't working.

   If IsNull(Forms!frmPlanted.txtGrowDaysCalc) Then
        MsgBox "You must select a Grow Days checkbox."
   End If
0
Comment
Question by:SteveL13
  • 2
2 Comments
 
LVL 28

Expert Comment

by:omgang
ID: 39787122
On the main form, select the subform object and set an On Enter event to display the message box if the text field is empty.  When the subform gets the focus (user clicks into it) the On Enter event will fire.
OM Gang
0
 
LVL 28

Accepted Solution

by:
omgang earned 500 total points
ID: 39787127
Example

Private Sub Form116_Enter()

    If IsNull(Me.txtGrowDaysCalc) Then
        MsgBox "You must select a Grow Days checkbox."
    End If
   
End Sub

OM Gang
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Access 2016 5 53
Access Date/Time to SQL Datetime2(7) 9 22
Search for text in a .txt file 14 40
ms access filter query with empty combobox 5 28
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now