Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

question for recordset update

Status
Not open for further replies.
Jul 30, 2007
42
US
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
 
A single post in any of the Access fora is sufficient, unless you are asked to post in another forum.

See:
thread705-1406383
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top