It depends on how you want to handle it. You could drop code into the forms OnClose event OR you could turn off the Close Button and add your own and use the OnClick Event to customize.
I'd recommend the latter as it gives you a lot more flexibility in approach.
From there it depends on how you want to handle things.
Would you want to have the code validate all three then step the user through editing them? Would you want to return an error message and then flag the fields visibly on the form? Would you just want to have it push you into the first detected invalid value and have the user hit close again (only to fail and send the user to the second control)
First things you need to understand is how to refer to your controls from within the form and from within a regular VBA module not directly attached to the form. From there it's just regular VBA.
Me.controlName.propertytomodify is the format to go after for the field value. You can use something like:
If len(Me.textbox1.Value)=0 Then
DoCmd.GotoControl (Me.textbox1.Name)
Exit Sub ' Use this if you want it to exit the routine
End If
If (test value) Then
End If
...
Alternatively, there are a variety of IsXXXXX (IsNumeric, IsDate - check VBA help within Access) things you can also test for directly.
Also, alternatively, your routines could include throw up basic inputboxes asking the user to manually type the value and you can push that value directly into the fields, such as:
strName = InputBox("What Value to Add?", "BoxTitle in Quotes")
Me.textbox1.Value = strName
Always remember though, you can only use 'Me' to refer to the same form you are currently on. It's equivalent to using functions elsewhere within VBA like ActiveCell, ActiveForm, etc. You can use it to drop into a subform or up into a parent object but it always starts with *this* form you are on now.
I know this doesn't give you a lot of specific answers. No "here is precisely how to do this" but it should show you the basic commands you need to use to do a little self-help.
Mike