disable add record button if any field

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Abdullah Tariqu
    New Member
    • Jan 2015
    • 3

    disable add record button if any field

    hi to all,
    if any field of data entry user skipped and click to add record button then i want to show a message to complete data entry and not added record in table. so pls help us.
    Thanks on advance.
    Abdullah Tarique
    Last edited by Abdullah Tariqu; Jan 14 '15, 07:01 PM. Reason: question not clear
  • Seth Schrock
    Recognized Expert Specialist
    • Dec 2010
    • 2965

    #2
    I hope you don't have very many fields. You are going to have to test the value in each control that is bound to a field to make sure that it isn't empty.
    Code:
    If (Me.Control1 & "" <> "") And (Me.Control2 & "" <> "") Then
        'Code to add the record
    Else
        MsgBox "Please complete the entry form."
    End If

    Comment

    Working...