On a form I use to add items to the product table there are two combo boxes:
cboDivision is used to select the division,
cboDescription is used to select the item (description).
(cboDescription is limited by what is first chosen in cboDivision).
When the description is chosen, other text fields on the form are populated with the product information and can then be edited. However, I'm suddenly receiving the following error message:
Run-time error '3021':
No current record.
The debugger highlights the >line of code< below:
/code
Private Sub cboDescription_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[ID] = " & Str(Me![cboDescription])
>Me.Bookmark = rs.Bookmark<
End Sub
Private Sub cboDivision_AfterUpdate()
Me.cboDescription.Requery
End Sub
/code
I don't recall making any changes before this began to occur, and I can't find anything in Access help or on Microsoft's Knowledge Base on error 3021. Can someone help me understand why the control can't find the corresponding record when cboDescription is selected?
Thanks very much in advance,
KerryL
cboDivision is used to select the division,
cboDescription is used to select the item (description).
(cboDescription is limited by what is first chosen in cboDivision).
When the description is chosen, other text fields on the form are populated with the product information and can then be edited. However, I'm suddenly receiving the following error message:
Run-time error '3021':
No current record.
The debugger highlights the >line of code< below:
/code
Private Sub cboDescription_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[ID] = " & Str(Me![cboDescription])
>Me.Bookmark = rs.Bookmark<
End Sub
Private Sub cboDivision_AfterUpdate()
Me.cboDescription.Requery
End Sub
/code
I don't recall making any changes before this began to occur, and I can't find anything in Access help or on Microsoft's Knowledge Base on error 3021. Can someone help me understand why the control can't find the corresponding record when cboDescription is selected?
Thanks very much in advance,
KerryL