I am trying to write an IF..Then code that will make a message appear if a textbox is not filled in or empty or save the file if the textbox has data in it. Below is what I was started out with and then got stuck. Can anyone help. Thanks Paul
If Me.Class = "" Then
MsgBox "You must enter this student's graduation year.", vbOKOnly
Me.Class.SetFocus
Else
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.GoToRecord , , acNewRec
Me.txtname.SetFocus
End If



