(msaccess) Sync user scrolling across multiple pages/tabs/datasheets? - ms-access

I have a form which contains multiple datasheet subforms, sorted into different pages of a tab control.
Each subform datasheet is based on an entirely different query, although in my case all subforms will always contain the exact same number of records as each other.
Question: Is it possible to programmatically capture user scrolling input (via keyboard, mousewheel, navigation buttons, or any combination thereof) and pass that information across subforms, so that, regardless of what the user does, whenever they switch pages/tabs, the same record number will always appear in row position one on every page/tab?
E.g. I have three subforms, each located with its own page control, and each underlying recordset has exactly 1000 records. A user scrolls down so that record # 575 shows in the first row of that page's subform. The user never actually selects any record, merely scrolls using mouse or keybpoard.
Is it possible to guarantee, that if the user switches to a different page/tab, that record number 575 of the corresponding recordset will show in the first row of the new page's datasheet?

There is no event to catch the scrolling itself, but you can control that the same current row id is visible in all subforms.
Full code and explanation including a working demo can be found and downloaded here:
Synchronizing Multiple Subforms in Access

Related

[ms access]'s listbox on visible off still runs?

i have a tab and has few pages on this tab control (say 8 pages) and each page has 2 or 3 listbox displaying some info related to that job (sales, admin, warehouse etc).
when a staff login, only the page related to their job is showing (tab page visible = false) and wondering if those listbox's row source still active (but not showing due to visible put to false)?
just wondering if affects performance due to many listbox in a form, visible or not?
thanks for reading.
Controls that are on an active, loaded form (even if they, or even the entire form, are/is not visible) can be queried against, period. Doesn't matter if they are on another tab or not. So yes, they will affect performance (likely negligibly, unless you've got thousands of or extremely complicated look-ups going on).
If the parent container(i.e a page on the tab is not visible), then all controls on the page will not be visible.
A control not visible in this instance because the parent container is not, e.g listbox, combo box, textbox, etc, does not consume memory space.

Rearranging the tab order of fields in a sub form in data sheet view

This is an ongoing problem, and I'm hoping there is just a property that I'm missing.
Scenario: I have a form that contains subforms. The Default View property for the subforms is set to Datasheet. (The main form is set to Single Form). Due to changes in what I'm tracking, I want to include another field that wasn't part of the original record source. So, I changed the record source (a query) and added the field to the subform. The new field is added to the end of the Datasheet view by default.
Here is the problem - when I drag the column to a new location on the subform (in Form view or Layout view), it does not stay put. I have made the change using Form view and Layout view, and I've changed the Tab Index property for the field to the proper number.  The new position never stays on the first, or second, sometimes third and fourth try. I have tried saving in Form view, Layout view and Design view, but I always have to drag the column back to the new position and try to save again . This goes on until Access actually saves the change. drag, save, didn't take; drag, save, didn't take; drag...
What I'd like to know is this - how do I rearrange columns on a form that is set to "Datasheet" for the Default View property, and make it stick the first time?
Thanks for any suggestions - I must be missing something....
This is a known "limitation" of datasheets. Some want the columns fit or preset, other sticky, some either as selected by the user.
To control the order of the columns, adjust the ColumnOrder property of the displayed controls.

Subform Table Source Show all records

I'm creating an Access database for data entry, so I put together the form shown in the image below. It works great besides one problems I'm having that I can't seem to nail down.
I want to create a form that navigates by hiding and un-hiding subforms when clicking the buttons in the top bar. The subforms themselves are linked directly to the table (not a form, but the table itself). I did this in order to have an easy way to enter multiple entries in an excel like fashion that the users are familiar with. Entering the data works fine. Closing the form and re-opening it however causes the subform to show each individual record and the record navigations must be used to cycle through each one.
The intention was for the records be shown in the same fashion as if I just opened the table. Is there any viable way to accomplish this?

Tab control not resetting to first page when filling last field

I'm fairly new to microsoft access and i'm currently designing a database for my company but I'm having some trouble trying to get the tab control to work properly. The problem is whenever it navigates through all the pages, when it reaches the last field to fill in, it goes to the next record but stays in the last page, it doesn't 'reset' back to the first page so it follows a logical order.
HansUp offered a good suggestion in his comment, but you may not want to unconditionally SetFocus the first tab in OnCurrent because that could cause the tab focus to switch as users navigate from one record to another using the record selector buttons. There could be cases where the users might find that annoying.
Instead, you might want to use the LostFocus event of the final field to manipulate a flag that would allow OnCurrent to SetFocus the first tab when the user moves to a new record by "falling off the end" of the previous record, but leave the tab focus alone if the user is just stepping through the records.

UiApp cache vertical panel

Developing small app to record a set of 6 readings for monitoring purposes in 31 rooms. App will have two main views, one view to show list of buttons for each room where readings will be taken, a second view where the values will be entered for a particular room and then posted to a spreadsheet.
The process in mind here is click on button for a particular room, enter the data, return to button view to choose another room to enter the data for that room and then back to button view screen.
Since the button view will seldom change do I have any options for caching this view so that I do not have to run a function to rebuild it each time. I have this function
function createTGSRoomListButtons(sh, aData){}
That takes the list of rooms and builds a panel of buttons for selecting the different rooms.
The question that I have can the above function be run once to cobble together the UI, cached and the later simply be 'recalled'?
TO that some end the view where the data will be entered can this be partially cached so that with each rendering a reference to a specific room can be made.
New to Google Apps Script so not really sure how to properly determine my answer.
You can have multiple panels in an UI and play with visibility to show one or another... no need to cache any content since they remain unchanged in the process.
If I understood your use case well, the panel with specific room info would be modified according to spreadsheet data so in this case you won't need to cache values since they would be "reconstructed" each time. The trick to show/hide panel has been shown in this post with clientHandlersand multiple panels in a unique vertical panel to ensure that the visible panel is always at the right place.
A very simple way would be build the UI for the first time and then hide/unhide the buttons' panel each time using the setVisible() method of the panel