ituser2008
MIS
I added a check box to the access form and to the table (“fed_express” with data type = yes/no) . I am getting an error message if I don’t check off the fed_express box. The error message is "run time error 3421: data type conversion error". I tried to debug but and found out it stopped at rs.fields (“fed_express”). During the debug, I noticed that “rs.fields(“fed_express”).value appeared to be “False” when I placed my cursor at the “rs.fields(“fed_express”) and [Forms]![custinfo]!fed_express is equal to “”. I was able to enter the first customer information without check off the fed_express box. However, I am getting error message when I tried to enter the 2nd customer information. The form clears out all the value for each fields after I click on the print button. I really don’t know how I can fix this. Any help will be greatly appreciated.
Thanks
Set rs = db_curr.OpenRecordset("Select * From tblcust")
rs.AddNew
rs.Fields("custid").Value = [Forms]![custinfo]!custID
rs.Fields("fed_express").Value = [Forms]![custinfo]!fed_express
rs.Fields("tracking").Value = [Forms]![custinfo]!tracking
rs.Update
rs.Close
Set rs = Nothing
Private Sub Print_Click()
Custid.value = ""
tracking.Value = ""
fed_express.Value = ""
stopsub:
End Sub
Thanks
Set rs = db_curr.OpenRecordset("Select * From tblcust")
rs.AddNew
rs.Fields("custid").Value = [Forms]![custinfo]!custID
rs.Fields("fed_express").Value = [Forms]![custinfo]!fed_express
rs.Fields("tracking").Value = [Forms]![custinfo]!tracking
rs.Update
rs.Close
Set rs = Nothing
Private Sub Print_Click()
Custid.value = ""
tracking.Value = ""
fed_express.Value = ""
stopsub:
End Sub