Solved

Trying to make a message box appear if certian criter exists

Posted on 2014-01-16
2
351 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

739 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