Avatar of mrroonie
Flag for United Kingdom of Great Britain and Northern Ireland asked on

Access 2010 Open a second form to the record selected on the first form, but still include all records

Hello all

i am creating an asset register using Access 2010. i have a user form that lists assets currently designated to that user in a subform, and i have another form that gives more details on the asset (serial etc).

i would like to be able to double click the asset listed in the users form to then open the asset form at the correct record. i have added code that works to this effect, but not exactly how i'd like it - the code i have is:

Private Sub Type_DblClick(Cancel As Integer)

DoCmd.OpenForm "frm_Asset", , , "Asset_ID = '" & Me.Asset_ID & "'"
End Sub

this opens the frm_Asset at the correct record but it's filtered, so the user needs to turn the filter off if they need to search through the main database. once the user turns the filter off the form then goes back to record 1.

is there anyway i can do this so it just jumps straight to the record, rather than filtering it out?

thanks in advace for suggestions
Microsoft Access

Avatar of undefined
Last Comment

8/22/2022 - Mon

BTW - the asset_ID field is a text field, not numeric
Scott McDaniel (EE MVE )

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

perfect - thanks!

I've requested that this question be closed as follows:

Accepted answer: 0 points for mrroonie's comment http:/Q_27250491.html#36349272

for the following reason:

Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy

sorry - i accepted the wrong comment - please accept LSMConsulting as the answer and award all points