Guest_imported
New member
- Jan 1, 1970
- 0
when i execute the following code by press add button and go to Customers Table , I find two records inserted with same data but into two rows with differnt identity
in my form there is a radio buttons and when i insert the data as record in Customers table, a two records inserted and in the first record the value of radio button field is the option value number and in second the string value as i need.
help me to solve the problem and only insert one record not two
The code is:
Set rst = dbs.OpenRecordset("Customers"
With rst
.AddNew
!CustomerID = CustomerID
!CustomerName = CustomerName
!CustomerAddr = CustomerAddr
!CustomerTel = CustomerTel
!CustomerFax = CustomerFax
!CustomerMail = CustomerMail
!City = City
.Update
End With
rst.Close
in my form there is a radio buttons and when i insert the data as record in Customers table, a two records inserted and in the first record the value of radio button field is the option value number and in second the string value as i need.
help me to solve the problem and only insert one record not two
The code is:
Set rst = dbs.OpenRecordset("Customers"
With rst
.AddNew
!CustomerID = CustomerID
!CustomerName = CustomerName
!CustomerAddr = CustomerAddr
!CustomerTel = CustomerTel
!CustomerFax = CustomerFax
!CustomerMail = CustomerMail
!City = City
.Update
End With
rst.Close