I have the following code
which works fine as it is the code behind a combo button.
I would like to change it so that it also works when form loads. e.g. when it loads then I would like the form to go instantly to 1 record.
I tried changing to the middle line to
and placing the code into the form open section but it errors.
is there any reason for this?
Thanks
Martin
Code:
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[LastName] = '" & Me![Combo60] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
which works fine as it is the code behind a combo button.
I would like to change it so that it also works when form loads. e.g. when it loads then I would like the form to go instantly to 1 record.
I tried changing to the middle line to
Code:
rs.FindFirst "[username] = '" & Forms!Frm_homepage![user_id] & "'"
and placing the code into the form open section but it errors.
is there any reason for this?
Thanks
Martin