Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting a bookmark to change current record

Status
Not open for further replies.

XTnCIS

Programmer
Apr 23, 2002
57
US
I have a form with two subforms. The two subforms refere to differnt fields in the same table.

One of the subforms shows the navigation buttons and one does not. When I use the navigation button to change a record, I want both subforms to go to the same record in the underlying table.

Right now I have code in the form_current event (of the form with the nav buttons): Me.parent.othersubform.form.Bookmark = Me.Bookmark

This works great! With one exception. It takes the form a second or two to count up the number of records in the subform and include that number in the navigation buttons. Until that happens, My attempt at setting the bookmark doesn't work. So if I open the form and quickly click on a different record or use the navigation button to change the record, the 2nd subform's bookmark doesn't get reset.

Once the #of records is calculated and shown in the navigation buttons the two forms stay in-sink...

Can anyone point me in the right direction?

Thanks!
 
Just curious, if they both point to fields in the same table, why are you using subforms?

Good Luck!

 
I pull information from an Oracle database, for each of those records there are fields for which the user can enter new values. So my table holds both sets of fields.

However, by using subforms for the different types of fields, I allow the user to, what I'm calling 'Switching views' of the individual subforms. For example, the data from Oracle may be viewed one record at a time or in sheet-view (like Excel). This aids in finding the particular record to be changed.

The 'new values fields' can be entered per count (i.e., for the count selected in the Oracle-data-subform / or / there is a view that is really an unbound subform that allows the user to enter changes which will affect all the fields that apply to all the records pulled from Oracle.

It's doesn't sound very straightforward, but it is working well. It gives the user all the functionality on one window (which of course really isn't just one form, but they don't see that).

Just as an additional comment, the view that is giving me the delay problem is the sheetview. When I am displaying the Oracle data form in single-record view there is no delay in being able to use the ONCURRENT event.

Any Help?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top