go to record in form with list (1 Viewer)

theinviter

Registered User.
Local time
Today, 14:32
Joined
Aug 14, 2014
Messages
240
Dear Guys,
need help

i have a form a need to go to record upon double click in list,
i tried below code but not going to record
as the record is combobox.

Code:
On Error GoTo errhandler:
n = 1 / 0 ' cause an error
'Move to the record selected in the control

With Me.[Combine Query].Form.RecordsetClone
    .FindFirst "[Combo88] = '" & Me.List104.Value & "'"
    If .NoMatch Then
        MsgBox "No Record Found!"
    Else
        Me.[Combine Query].Form.Bookmark = .Bookmark
    End If
End With

Exit Sub
errhandler:
' error handling code
Resume Next

Code Tags Added by UG
Please use Code Tags when posting VBA Code
Please read this for further information:-
https://www.access-programmers.co.u...e-use-code-tags-when-posting-vba-code.240420/
Please feel free to Remove this Comment
 
Last edited by a moderator:

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 05:32
Joined
May 7, 2009
Messages
19,231
is the Combobox bound to a Field of a table, then use the ControlSource of the Combobox.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 22:32
Joined
Feb 19, 2013
Messages
16,607
not clear what you are trying to do, but if combo88 is bound to a field, use the field name
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 17:32
Joined
Feb 19, 2002
Messages
43,213
Why are you deliberately causing a divide by zero error?
Why are you starting another thread on the same topic? Did you not like the answers you got originally? This is really poor practice. You are making the people who see this thread repeat the work that has already been done to respond to your earlier question. You have been a member long enough to know better.
 

Gasman

Enthusiastic Amateur
Local time
Today, 22:32
Joined
Sep 21, 2011
Messages
14,231
Also cannot be bothered to use code tags. :mad:
 

Users who are viewing this thread

Top Bottom