-2
Private Sub cmdenter_Click()
If Option1.Value = True Then
db.Execute "Insert into TM_REGISTRATION values('" + txtregdn.Text + "','" + txtformno.Text + "','" + Combo1.Text + "','" + Format(mskadmdt.Text, "mm-dd-yyyy") + "','" + studentname.Text + "','" + Combo2.Text + "','" + fname.Text + "','" + fmobile.Text + "','" + mname.Text + "','" + mmobile.Text + "','" + gname.Text + "','" + gmobile.Text + "','" + Format(mskdob.Text, "mm-dd-yyyy") + "',1,0,'" + Combo3.Text + "','" + Combo4.Text + "','" + Combo5.Text + "','" + Combo6.Text + "','" + txtaddress1.Text + "','" + txtaddress2.Text + "','" + district.Text + "','" + pincode.Text + "','" + Picture1.Picture + "')"
ElseIf Option2.Value = True Then
db.Execute "Insert into TM_REGISTRATION values('" + txtregdn.Text + "','" + txtformno.Text + "','" + Combo1.Text + "','" + Format(mskadmdt.Text, "mm-dd-yyyy") + "','" + studentname.Text + "','" + Combo2.Text + "','" + fname.Text + "','" + fmobile.Text + "','" + mname.Text + "','" + mmobile.Text + "','" + gname.Text + "','" + gmobile.Text + "','" + Format(mskdob.Text, "mm-dd-yyyy") + "',0,1,'" + Combo3.Text + "','" + Combo4.Text + "','" + Combo5.Text + "','" + Combo6.Text + "','" + txtaddress1.Text + "','" + txtaddress2.Text + "','" + district.Text + "','" + pincode.Text + "','" + Picture1.Picture + "')"
End If
End Sub
[VBAでの動的SQLをデバッグする方法](http://stackoverflow.com/a/1099570/3820271) – Andre
受信した正確なエラーメッセージは何ですか?それはVB6からですか、それはアクセスからですか? – DaveInCaz