Hi,
I have a form (select_client) where I have a combo box (clients) showing certain fields from a table.
When a record has been selected from the combo box and the user clicks on an item (select) I want another form to open up showing all the fields from this record.
The code I am using is;
Private Sub select_Click()
Dim stDocName As String
Dim rs As Object
stDocName = "View_amend_client"
Set rs = Me.RecordsetClone
DoCmd.OpenForm stDocName
rs.FindFirst "[ID] = " & Str(Me![clients])
Set Forms!View_amend_client.Bookmark = rs.Bookmark
Set rs = Nothing
DoCmd.Close acForm, "Select_client"
End Sub
The problem is I'm getting an 'object required' error with my 'Set' statement.
Any help would be greatly appreciated.
I have a form (select_client) where I have a combo box (clients) showing certain fields from a table.
When a record has been selected from the combo box and the user clicks on an item (select) I want another form to open up showing all the fields from this record.
The code I am using is;
Private Sub select_Click()
Dim stDocName As String
Dim rs As Object
stDocName = "View_amend_client"
Set rs = Me.RecordsetClone
DoCmd.OpenForm stDocName
rs.FindFirst "[ID] = " & Str(Me![clients])
Set Forms!View_amend_client.Bookmark = rs.Bookmark
Set rs = Nothing
DoCmd.Close acForm, "Select_client"
End Sub
The problem is I'm getting an 'object required' error with my 'Set' statement.
Any help would be greatly appreciated.