Guest_imported
New member
- Jan 1, 1970
- 0
hi,
i tried to do some codings behind my form to link it to the database and update my fields. However, I encounter run-time error when I run my form. I do not know what is teh problem. I think I set my connection and recordsource correctly.
My codes at the Form load is :
With Adodc1.Recordset
.AddNew
!MemName = frmregistration.txtname
!MemNRIC = frmregistration.txtnric
!MemAdd = frmregistration.txtaddress1 & frmregistration.txtaddress2
!MemHome = frmregistration.txthome
!MemHP = frmregistration.txthandphone
!DOB = frmregistration.cboday1 & "/" & frmregistration.cbomth1 & "/" & frmregistration.cboyear1
!JoinDate = frmregistration.txtday1 & "/" & frmregistration.txtmth1 & "/" & frmregistration.txtyear1
!ExpiryDate = frmregistration.txtday & "/" & frmregistration.txtmth & "/" & frmregistration.txtyear
!Nationality = frmregistration.cbonationality
!gender = gender
!job = job
.Update
End With
May I know what is wrong wif it?
It shows me that I have error at the .AddNew part.
Thanks a lot,
Janet
i tried to do some codings behind my form to link it to the database and update my fields. However, I encounter run-time error when I run my form. I do not know what is teh problem. I think I set my connection and recordsource correctly.
My codes at the Form load is :
With Adodc1.Recordset
.AddNew
!MemName = frmregistration.txtname
!MemNRIC = frmregistration.txtnric
!MemAdd = frmregistration.txtaddress1 & frmregistration.txtaddress2
!MemHome = frmregistration.txthome
!MemHP = frmregistration.txthandphone
!DOB = frmregistration.cboday1 & "/" & frmregistration.cbomth1 & "/" & frmregistration.cboyear1
!JoinDate = frmregistration.txtday1 & "/" & frmregistration.txtmth1 & "/" & frmregistration.txtyear1
!ExpiryDate = frmregistration.txtday & "/" & frmregistration.txtmth & "/" & frmregistration.txtyear
!Nationality = frmregistration.cbonationality
!gender = gender
!job = job
.Update
End With
May I know what is wrong wif it?
It shows me that I have error at the .AddNew part.
Thanks a lot,
Janet