hrufescens
asked on
Opening form without filtering records
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!
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!
ASKER
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
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
with me.parent.recordsetclone
.findfirst ="[ID_Room]= " & me.[ID_Room]
if not .nomatch then me.parent.bookmark=.bookma
end with
ASKER
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]
Run-time error '3251' Operation is not supported for this type of object
on this statement:
.FindFirst = "[ID_Room]= " & Me.[ID_Room]
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
where are you calling the codes from?
you can not identify where the problem is, by just posting a part of the codes
ASKER
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
can you attach your db. check attach file below
ASKER
Sure- I'll have to un-split it and shrink it a bit. Hold on..
ASKER
Here it is, boiled down to the tables/forms in question. Thanks...
GapDB-excerpt.mdb
GapDB-excerpt.mdb
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you capricorn1- works great. You're awesome!
post the codes that you are using