[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Opening form without filtering records

Posted on 2008-11-19
11
Medium Priority
?
329 Views
Last Modified: 2013-11-28
Hi,

I have a form with a subform that feeds off the same table.  I'd like the user to be able to click a button in the subform and have the main form jump to that record.

When I try this using the wizard, the main form jumps to the desired record just fine, but it is filtered.  Is there a way to code this so my users don't end up in a one-way street?  Put another way, is there a way to leave the main form at the desired record and still have the navigation buttons work properly?

Thanks!
0
Comment
Question by:hrufescens
  • 6
  • 5
11 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 22997233
alter your codes to use FindFirst instead of filtering the form


post the codes that you are using
0
 

Author Comment

by:hrufescens
ID: 22997296
Hi capricorn1,

Code I'm using is the standard wizard output.

I get your comment- can you hold my hand on syntax?  Something like

recordset.FindFirst  <blahblahblah>

where blahblahblah matches two fields:  ID_Room on the parent form and ID_Room on the subform.

Thanks
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 22997380

     with me.parent.recordsetclone
            .findfirst ="[ID_Room]= " & me.[ID_Room]
            if not .nomatch then me.parent.bookmark=.bookmark


     end with
0
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 

Author Comment

by:hrufescens
ID: 22997714
Had a problem:
Run-time error '3251' Operation is not supported for this type of object

on this statement:
.FindFirst = "[ID_Room]= " & Me.[ID_Room]
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 22997748
post the whole code.
where are you calling the codes from?

you can not identify where the problem is, by just posting a part of the codes
0
 

Author Comment

by:hrufescens
ID: 22997786
Calling this code on double-click [event procedure].
Option Compare Database
 
Private Sub Elev_DblClick(Cancel As Integer)
    With Me.Parent.RecordsetClone
        .FindFirst = "[ID_Room]= " & Me.[ID_Room]
        If Not .NoMatch Then Me.Parent.Bookmark = .Bookmark
    End With
End Sub

Open in new window

0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 22997815
can you attach your db. check attach file below
0
 

Author Comment

by:hrufescens
ID: 22998444
Sure- I'll have to un-split it and shrink it a bit.  Hold on..
0
 

Author Comment

by:hrufescens
ID: 22999226
Here it is, boiled down to the tables/forms in question. Thanks...
GapDB-excerpt.mdb
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 total points
ID: 22999532
my bad... my mistake

use this

Private Sub Elev_DblClick(Cancel As Integer)
    With Me.Parent.RecordsetClone
        .FindFirst  "[ID_Room]= " & Me.[ID_Room]
        If Not .NoMatch Then Me.Parent.Bookmark = .Bookmark
    End With
End Sub
0
 

Author Closing Comment

by:hrufescens
ID: 31518391
Thank you capricorn1- works great.  You're awesome!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Windows Explorer let you handle zip folders nearly as any other folder: Copy, move, change, and delete, etc. In VBA you can also handle normal files and folders, but zip folders takes a little more - and that you'll find here.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Suggested Courses
Course of the Month19 days, 22 hours left to enroll

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question