G
Guest
I have a form that has a combo box, which has the list of project names in
the Project table and when the user chooses one of them, the fields that are
related to the project gets populated.
The problem is that it was working fine until couple of days ago, and the
changes I've made since then are adding 3 command buttons which each of them
ables/disables the Visible property of various components of the form.
Basically it makes different parts of the table appear and disappear and the
combo box that is causing the problem is part of that too.
The code is as follows:
Private Sub Combo89_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Name] = '" & Me![Combo89] & "'"
Me.Bookmark = rs.Bookmark
End Sub
When I choose a project in the combo box, it gives me
"Run-time error '3021':
No current record.
I'm kinda new to the whole VB coding, but it seems like Me.Bookmark stays
empty. The early version of the db I have works fine with the same code.
Any suggestions or help will be greatly appreciated!
the Project table and when the user chooses one of them, the fields that are
related to the project gets populated.
The problem is that it was working fine until couple of days ago, and the
changes I've made since then are adding 3 command buttons which each of them
ables/disables the Visible property of various components of the form.
Basically it makes different parts of the table appear and disappear and the
combo box that is causing the problem is part of that too.
The code is as follows:
Private Sub Combo89_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Name] = '" & Me![Combo89] & "'"
Me.Bookmark = rs.Bookmark
End Sub
When I choose a project in the combo box, it gives me
"Run-time error '3021':
No current record.
I'm kinda new to the whole VB coding, but it seems like Me.Bookmark stays
empty. The early version of the db I have works fine with the same code.
Any suggestions or help will be greatly appreciated!