Data type conversion error

Joined
Mar 15, 2016
Messages
1
Reaction score
0
I am a Access beginner. I have a form that I enter data from. The first time I enter the data things go fine but when I try a second time I get a Data Type Conversion Error. If I close the form and reopen it then I can enter the data. Any help would be great. Thanks.

Code:
Private Sub cbEnterData_Click()

Dim db As Database
Dim rs As Recordset

   On Error GoTo cbEnterData_Click_Error

Set db = CurrentDb
Set rs = db.OpenRecordset("tblGeneral")

rs.AddNew

rs!apaPNID = Me.apaPNID.Value
rs!cboapaDivision = Me.cboapaDivision.Value
rs!cboapaUnit = Me.cboapaUnit.Value
rs!cboapaSection = Me.cboapaSection.Value
rs!recordDate = Me.recordDate.Value
rs!warrantFelony = Me.warrantFelony.Value
rs!warrantMisd = Me.warrantMisd.Value
rs!warrantDeny = Me.warrantDeny.Value
rs!warrantReturn = Me.warrantReturn.Value
rs!pccAdj = Me.pccAdj.Value
rs!pccReMisdPlea = Me.pccReMisdPlea.Value
rs!pccFelonyPlea = Me.pccFelonyPlea.Value
rs!pccSetExam = Me.pccSetExam.Value
rs!pccDism = Me.pccDism.Value
rs!pccRefComp = Me.pccRefComp.Value
rs!pccCapias = Me.pccCapias.Value
rs!pccWBO = Me.pccWBO.Value
rs!examHBO = Me.examHBO.Value
rs!examWBO = Me.examWBO.Value
rs!examReMisdCt = Me.examReMisdCt.Value
rs!examReMisdPlea = Me.examReMisdPlea.Value
rs!examCapias = Me.examCapias.Value
rs!examAdjDefNoDisc = Me.examAdjDefNoDisc.Value
rs!examAdjDefOther = Me.examAdjDefOther.Value
rs!examAdjCt = Me.examAdjCt.Value
rs!examAdjPros = Me.examAdjPros.Value
rs!examHIP = Me.examHIP.Value
rs!examAdjRefComp = Me.examAdjRefComp.Value
rs!examDismPOFTA = Me.examDismPOFTA.Value
rs!examDismPOFTACT = Me.examDismPOFTACT.Value
rs!examDismCWFTA = Me.examDismCWFTA.Value
rs!examDismInsuffEvHeld = Me.examDismInsuffEvHeld.Value
rs!examDismInsuffEvNotHeld = Me.examDismInsuffEvNotHeld.Value
rs!examDismEvidSuppress = Me.examDismEvidSuppress.Value
rs!examDismDefIncomp = Me.examDismDefIncomp.Value
rs!examDismOther = Me.examDismOther.Value
rs!examDismOver5Years = Me.examDismOver5Years.Value
rs!examDismReissue = Me.examDismReissue.Value
rs!fJTGuilty = Me.fJTGuilty.Value
rs!fJTNGDV = Me.fJTNGDV.Value
rs!fJTGP = Me.fJTGP.Value
rs!fJTHJ = Me.fJTHJ.Value
rs!fJTCapias = Me.fJTCapias.Value
rs!fJTAdj = Me.fJTAdj.Value
rs!fJTDism = Me.fJTDism.Value
rs!fBTGuilty = Me.fBTGuilty.Value
rs!fBTNGDV = Me.fBTNGDV.Value
rs!fBTGP = Me.fBTGP.Value
rs!fBTCapias = Me.fBTCapias.Value
rs!fBTAdj = Me.fBTAdj.Value
rs!fBTDism = Me.fBTDism.Value
rs!fPTGP = Me.fPTGP.Value
rs!fPTHeldNoAction = Me.fPTHeldNoAction.Value
rs!fPTCapias = Me.fPTCapias.Value
rs!fPTAdj = Me.fPTAdj.Value
rs!fPTDism = Me.fPTDism.Value
rs!fPTDismEH = Me.fPTDismEH.Value
rs!fPTNotDismEH = Me.fPTNotDismEH.Value
rs!fPTDismMotion = Me.fPTDismMotion.Value
rs!fPTNotDismMotion = Me.fPTNotDismMotion.Value
rs!otherSent = Me.otherSent.Value
rs!otherPostConvMotions = Me.otherPostConvMotions.Value
rs!otherSW = Me.otherSW.Value
rs!otherIS = Me.otherIS.Value
rs!mJTGuilty = Me.mJTGuilty.Value
rs!mJTNGDV = Me.mJTNGDV.Value
rs!mJTGP = Me.mJTGP.Value
rs!mJTHJ = Me.mJTHJ.Value
rs!mJTCapias = Me.mJTCapias.Value
rs!mJTAdj = Me.mJTAdj.Value
rs!mJTDism = Me.mJTDism.Value
rs!mBTGuilty = Me.mBTGuilty.Value
rs!mBTNGDV = Me.mBTNGDV.Value
rs!mBTGP = Me.mBTGP.Value
rs!mBTAdj = Me.mBTAdj.Value
rs!mBTDism = Me.mBTDism.Value
rs!mPTHeldNoAction = Me.mPTHeldNoAction.Value
rs!mPTGP = Me.mPTGP.Value
rs!mPTCapias = Me.mPTCapias.Value
rs!mPTAdj = Me.mPTAdj.Value
rs!mPTDism = Me.mPTDism.Value
rs!mPTDismEH = Me.mPTDismEH.Value
rs!mPTNotDismEH = Me.mPTNotDismEH.Value
rs!mPTDismMotion = Me.mPTDismMotion.Value
rs!mPTNotDismMotion = Me.mPTNotDismMotion.Value
rs!cGP = Me.cGP.Value
rs!cHearings = Me.cHearings.Value
rs!cOther = Me.cOther.Value
rs!dismCWFTA = Me.dismCWFTA.Value
rs!dismCWNP = Me.dismCWNP.Value
rs!dismPOFTA = Me.dismPOFTA.Value
rs!dismPOFTACt = Me.dismPOFTACt.Value
rs!dismNWFTA = Me.dismNWFTA.Value
rs!dismPONoEvid = Me.dismPONoEvid.Value
rs!dismLabIncomp = Me.dismLabIncomp.Value
rs!dismNoFile = Me.dismNoFile.Value
rs!dismEvidDestroy = Me.dismEvidDestroy.Value
rs!dismInfoQuash = Me.dismInfoQuash.Value
rs!dismEvidSupp = Me.dismEvidSupp.Value
rs!dism180Dp = Me.dism180Dp.Value
rs!dismSentConvict = Me.dismSentConvict.Value
rs!dismDefIncomp = Me.dismDefIncomp.Value
rs!dismDefDead = Me.dismDefDead.Value
rs!dismNPInsuffEvid = Me.dismNPInsuffEvid.Value
rs!dismNPLegExc = Me.dismNPLegExc.Value
rs!dismNPFed = Me.dismNPFed.Value
rs!dismNPPlea = Me.dismNPPlea.Value
rs!inputDate = Me.inputDate.Value
rs!recordDate = Me.recordDate.Value
rs.Update
rs.Close
Set rs = Nothing
Set db = Nothing

MsgBox "Record Saved"

 warrantFelony = ""
 warrantMisd = ""
 warrantDeny = ""
 warrantReturn = ""
 pccAdj = ""
 pccReMisdPlea = ""
 pccFelonyPlea = ""
 pccSetExam = ""
 pccDism = ""
 pccRefComp = ""
 pccCapias = ""
 pccWBO = ""
 examHBO = ""
 examWBO = ""
 examReMisdCt = ""
 examReMisdPlea = ""
 examCapias = ""
 examAdjDefNoDisc = ""
 examAdjDefOther = ""
 examAdjCt = ""
 examAdjPros = ""
 examHIP = ""
 examAdjRefComp = ""
 examDismPOFTA = ""
 examDismPOFTACT = ""
 examDismCWFTA = ""
 examDismInsuffEvHeld = ""
 examDismInsuffEvNotHeld = ""
 examDismEvidSuppress = ""
 examDismDefIncomp = ""
 examDismOther = ""
 examDismOver5Years = ""
 examDismReissue = ""
 fJTGuilty = ""
 fJTNGDV = ""
 fJTGP = ""
 fJTHJ = ""
 fJTCapias = ""
 fJTAdj = ""
 fJTDism = ""
 fBTGuilty = ""
 fBTNGDV = ""
 fBTGP = ""
 fBTCapias = ""
 fBTAdj = ""
 fBTDism = ""
 fPTGP = ""
 fPTHeldNoAction = ""
 fPTCapias = ""
 fPTAdj = ""
 fPTDism = ""
 fPTDismEH = ""
 fPTNotDismEH = ""
 fPTDismMotion = ""
 fPTNotDismMotion = ""
 otherSent = ""
 otherPostConvMotions = ""
 otherSW = ""
 otherIS = ""
 mJTGuilty = ""
 mJTNGDV = ""
 mJTGP = ""
 mJTHJ = ""
 mJTCapias = ""
 mJTAdj = ""
 mJTDism = ""
 mBTGuilty = ""
 mBTNGDV = ""
 mBTGP = ""
 mBTAdj = ""
 mBTDism = ""
 mPTHeldNoAction = ""
 mPTGP = ""
 mPTCapias = ""
 mPTAdj = ""
 mPTDism = ""
 mPTDismEH = ""
 mPTNotDismEH = ""
 mPTDismMotion = ""
 mPTNotDismMotion = ""
 cGP = ""
 cHearings = ""
 cOther = ""
 dismCWFTA = ""
 dismCWNP = ""
 dismPOFTA = ""
 dismPOFTACt = ""
 dismNWFTA = ""
 dismPONoEvid = ""
 dismLabIncomp = ""
 dismNoFile = ""
 dismEvidDestroy = ""
 dismInfoQuash = ""
 dismEvidSupp = ""
 dism180Dp = ""
 dismSentConvict = ""
 dismDefIncomp = ""
 dismDefDead = ""
 dismNPInsuffEvid = ""
 dismNPLegExc = ""
 dismNPFed = ""
 dismNPPlea = ""
 inputDate = Date
 recordDate = ""

 warrantFelony.SetFocus


   On Error GoTo 0
   Exit Sub

cbEnterData_Click_Error:

    MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure cbEnterData_Click of VBA Document Form_frmGeneralInput"
End Sub
[Code]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top