Hi,

I have been using this application for 3 months. It was working fine till yesterday. But now it is not working. Showing runtime error '13' when I am trying to save the data (and it highlights the code which is shown in bold in the following code).

The following is the code:

VB Code:
  1. Private Sub cmdSave_Click()
  2.  
  3. If txtCustomerName.Text <> "" Then
  4.    
  5.   With rs
  6.  
  7.  .AddNew
  8.  
  9.  .Fields("CustomerName").Value = txtCustomerName.Text
  10.  .Fields("SalesPerson").Value = txtSalesPerson.Text
  11.  .Fields("InvoiceNumber").Value = txtInvoiceNumber.Text
  12. [B] .Fields("InvoiceDate").Value = CDate(txtInvoiceDate.Text)[/B]
  13.  .Fields("InvoiceAmount").Value = CCur(txtInvoiceAmount.Text)
  14.  .Fields("Description").Value = txtDescription.Text
  15.  .Fields("CreditPeriod").Value = CLng(txtCreditPeriod.Text)
  16.  .Fields("FileNumber").Value = txtFileNumber.Text
  17.  .Fields("City").Value = txtCity.Text
  18.  
  19. .Update
  20.  
  21. End With
  22.  
  23. Call Enable_FormControls
  24. Call Save_UpdateControls
  25. Call Instructions
  26. cmdSave.Enabled = False
  27.  
  28. Else
  29.  
  30. Call Enable_FormControls
  31. Call Save_UpdateControls
  32. Call Instructions
  33. cmdSave.Enabled = False
  34.  
  35. End If
  36. End Sub

Thanks in advance.

Regards,

Seema_S