Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

If text box is Null 1

Status
Not open for further replies.

cthai

Technical User
Apr 19, 2011
53
US
Hi,

I have a form and we have a txtDetermination and a Determination_date - what happen is the user will enter the Determination_date but does not fill in the txtDetermination (this is a drop down, "Pass" or "Fail") is there a way that we can have a pop up message that tell the user " Determination can not be blank with a Determination Date" and clear out the Determination_date ?
 

One way would be to lock or disable the text box until a value is selected in the combo box.


Randy
 
Hi Randy700!

How do you lock or disable the text box? so the text box i would want to lock/disable would be the Determination_date - if txtDetermination is NULL then Determination_date can not be fill in.

 
Use the BeforeUpdate event procedure of the form to enforce all the rules.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
How are cthai . . .

Agree with [blue]PHV[/blue]. Use the [blue] Before Update[/blue] event of [blue]Determination_date[/blue] to validate [blue] txtDetermination[/blue]:
Code:
[blue]   If Trim(Me.txtDetermination & "") = "" Then
      MsgBox " Determination can not be blank with a Determination Date!"
      Me.txtDetermination.SetFocus
   End If[/blue]
[blue]Your Thoughts? . . .[/blue]

See Ya! . . . . . .

Be sure to see faq219-2884 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Thank you AceMan! I did Me.Determination_date.undo so that when they do enter the date it will undo the informations.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top