Link to home
Start Free TrialLog in
Avatar of iregan
iregan

asked on

Database entry

Private Sub cmdAdd_Click()
CompDate = mskDate.Text
CompStart = mskStart.Text
CompFinish = mskFinish.Text

Me.AdoNewComp.Refresh

With AdoNewComp.Recordset
!Sponsor_of_Comp = txtSponsor
!Date = CompDate
!Type_1 = cmbType1
!Type_2 = cmbType2
!Type_3 = cmbType3
!No_of_Holes = cmbHoles
!Markers = cmbMarkers
!Start_Time = CompStart
!Finish_Time = CompFinish
.Update
End With


Any idea whats wrong with this code, i get the multiple step operation error?



Avatar of kshore
kshore

What about adding '.Text' after after the references to the combo box value, as follows:

Private Sub cmdAdd_Click()
CompDate = mskDate.Text
CompStart = mskStart.Text
CompFinish = mskFinish.Text

Me.AdoNewComp.Refresh

With AdoNewComp.Recordset
!Sponsor_of_Comp = txtSponsor
!Date = CompDate
!Type_1 = cmbType1.Text
!Type_2 = cmbType2.Text
!Type_3 = cmbType3.Text
!No_of_Holes = cmbHoles.Text
!Markers = cmbMarkers.Text
!Start_Time = CompStart
!Finish_Time = CompFinish
.Update
End With
ASKER CERTIFIED SOLUTION
Avatar of QJohnson
QJohnson

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of iregan

ASKER

Got the problem solved but Ill give u the points