T
tim johnson
I am using an unbound to add new record to tblCustomer
below.
The procedure below is attached to the click event of a
cmdButton but on clicking nothing happens.
What am I doing wrong? The relevant library ActiveX 2.7
ADO library is present
Set rst = New ADODB.Recordset
Set cnn = CurrentProject.Connection
rst.Open "tblCustomer", cnn, adOpenKeyset,
adLockOptimistic, adCmdTable
With rst
.AddNew
.Fields("Zip") = Me.Zip
.Fields("CurDate") = Me.CurDate
.Fields("Salutation") = Me.Salutation
.Fields("FirstName") = Me.FirstName
.Fields("LastName") = Me.LastName
.Fields("Street") = Me.Street
.Fields("City") = Me.City
.Fields("State") = Me.State
.Fields("Comments") = Me.Comments
.Update
End With
Thanks
below.
The procedure below is attached to the click event of a
cmdButton but on clicking nothing happens.
What am I doing wrong? The relevant library ActiveX 2.7
ADO library is present
Set rst = New ADODB.Recordset
Set cnn = CurrentProject.Connection
rst.Open "tblCustomer", cnn, adOpenKeyset,
adLockOptimistic, adCmdTable
With rst
.AddNew
.Fields("Zip") = Me.Zip
.Fields("CurDate") = Me.CurDate
.Fields("Salutation") = Me.Salutation
.Fields("FirstName") = Me.FirstName
.Fields("LastName") = Me.LastName
.Fields("Street") = Me.Street
.Fields("City") = Me.City
.Fields("State") = Me.State
.Fields("Comments") = Me.Comments
.Update
End With
Thanks