M
Martin
Hello,
I have this code which is for a button on a form with just one unbound text
box. The idea is that the user types in a name of a client and this name is
added to the table. Here is the code:
Private Sub Add_Click()
Dim DBS As Database, rs As Recordset
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 Sub
The problem is that the value of the unbound text box is null and so nothing
is added. My question is how do I capture the data the user has entered into
the text box?
Any help woudl be greatly appreciated.
Many thanks,
Martin
I have this code which is for a button on a form with just one unbound text
box. The idea is that the user types in a name of a client and this name is
added to the table. Here is the code:
Private Sub Add_Click()
Dim DBS As Database, rs As Recordset
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 Sub
The problem is that the value of the unbound text box is null and so nothing
is added. My question is how do I capture the data the user has entered into
the text box?
Any help woudl be greatly appreciated.
Many thanks,
Martin