Sounds as though this only happens if they click the button before they fill
in the field, therefore you need to check for that case:
Private Sub Add_Click()
Dim DBS As Database, rs As Recordset
If IsNull(Me.CName.Value) = True Then
MsgBox "Enter a name first."
Else
Set DBS = OpenDatabase("\\Database Name")
Set rs = DBS.OpenRecordset("tbl Customer Names", dbOpenTable)
rs.AddNew
rs![Name] = Me.CName.Value
rs.Update
DoCmd.Close acForm, "Customer Name Add"
End If
End Sub
Personally, I'd be more inclined to use an INSERT INTO SQL statement rather
than bothering with a recordset:
Private Sub Add_Click()
Dim DBS As Database
Dim strSQL As String
If IsNull(Me.CName.Value) = True Then
MsgBox "Enter a name first."
Else
Set DBS = OpenDatabase("\\Database Name")
strSQL= "INSERT INTO tblCustomerNames ([Name]) " & _
"VALUES (""" & Me.CName.Value & """)"
DBS.Execute strSQL, dbFailOnError
DoCmd.Close acForm, "Customer Name Add"
End If
End Sub
I'd also change the field name from Name. Name is a reserved word, and you
should never use reserved words for your own purposes. For a good discussion
on what names to avoid, see what Allen Browne has at
http://www.allenbrowne.com/AppIssueBadWord.html

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
> Hello,
>
[quoted text clipped - 29 lines]
>
> Martin