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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem linking the database with the forms

Status
Not open for further replies.

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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top