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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Keeping a Comment with only blank spaces from creating a record

Status
Not open for further replies.

jlathem

Technical User
Jul 25, 2010
27
Can anyone suggest how I can keep a record from being created in a comment table if if the “Comment” text box is blank or only has blank spaces in the text box?
 
In the BeforeUpdate event procedure of the form:
Code:
If Trim(Me![txtComment] & "") = "" Then
  MsgBox "Please enter a comment"
  Cancel = True
End If

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thank you for your help. That worked for me.

James
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top