MAXGIZ
05-24-2007, 11:18 AM
Good Day
I'm busy with a project, i have a database with tables where the forms are connected to, in my forms that i have created i have change the boxes that was created by the forms wizard to a combo box, i need to program this combo box so that when i click on it i can select a certain number the data that is attach to will be displayed....i have created a new combox and looked at the code(as i'm a beginer with this) i've copied the code and went to the combo box that doesn't work, pasted the code but as soon as i select a number it gives the following error: Update or CancelUpdate without AddNew or Edit. (Error 3020) below is the code that i used:
Private Sub CL_NR_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[CL_NR] = '" & Me![CL_NR] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
I'm busy with a project, i have a database with tables where the forms are connected to, in my forms that i have created i have change the boxes that was created by the forms wizard to a combo box, i need to program this combo box so that when i click on it i can select a certain number the data that is attach to will be displayed....i have created a new combox and looked at the code(as i'm a beginer with this) i've copied the code and went to the combo box that doesn't work, pasted the code but as soon as i select a number it gives the following error: Update or CancelUpdate without AddNew or Edit. (Error 3020) below is the code that i used:
Private Sub CL_NR_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[CL_NR] = '" & Me![CL_NR] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub