If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Stay with Current Record
Here we go again ......
Currently have a form "frmMainform" with subform "frmSubForm" where/when there is no data in the subform I CLICK on a button to invoke a "frmPopUpForm" to add info to the subform table which is bound. After close, the requery statement takes place and requeries but returns the "frmMainForm" and the related "frmSubform" to the first record of the "frmMainForm". How do I stay with the same record I was viewing when I invoked the "frmPopUpForm"? Regards |
#2
|
|||
|
|||
Stay with Current Record
Store the primary key of the current record
Then do the requery Then find the record that has the primary key. Something like the following UNTESTED AIRCODE. Dim lngPK as Long lngPK = Me.PrimaryKey Me.Requery With Me.RecordsetClone .FindFirst "PrimaryKey = " & lngPk if .NoMatch = False then Me.BookMark = .Bookmark End if end With Tee See wrote: Here we go again ...... Currently have a form "frmMainform" with subform "frmSubForm" where/when there is no data in the subform I CLICK on a button to invoke a "frmPopUpForm" to add info to the subform table which is bound. After close, the requery statement takes place and requeries but returns the "frmMainForm" and the related "frmSubform" to the first record of the "frmMainForm". How do I stay with the same record I was viewing when I invoked the "frmPopUpForm"? Regards |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Adding tables | Gertjan | Running & Setting Up Queries | 1 | December 19th, 2005 04:20 PM |
Question abt POP form to current record details... | Brook | Using Forms | 2 | December 13th, 2005 06:27 AM |
Need Help In Printing Current Record in Specific Report | RNUSZ@OKDPS | Setting Up & Running Reports | 1 | May 16th, 2005 09:06 PM |
Multiple Report printing for current record from check box | terry | New Users | 6 | April 14th, 2005 09:29 PM |
Transferring Current Record From One Form To Another | Abilly | General Discussion | 1 | August 3rd, 2004 01:05 PM |