Data entry req

  • Thread starter Thread starter tim timsen
  • Start date Start date
T

tim timsen

Guest
How do I make data entry required, I've sent it to be in the table but it doesnt seem to work in the form

I've tried the below with no luck

Code:
Private Sub Command14_Click()
    If tbName = Null Or tbTelephone = Null Or tbAddress = Null Then
    MsgBox "Please complete all details.", vbExclamation
    Else
    DoCmd.Close
    DoCmd.OpenForm "frmInvoice"
    DoCmd.MoveSize , , 5100
End If
End Sub

Cheers
 
Last edited:
NULL is an odd one...

Hi Tim

Have a look at this link http://allenbrowne.com/casu-12.html which will tell you all about using NULL.

Essentially NULL does not mean empty, it means Unknown.
You need to look at functions like NZ (which gives Nulls a value) and IsEmpty or simply = "" to test for when nothing is entered into the field. Obviously you can test for the length of strings using LEN as well.

I have found Allen Browne's website very useful for tips and tricks and is well worth reading.

HTH
Regards
Rod
 

Users who are viewing this thread

Back
Top Bottom