Autorefresh of the record number in (1 Viewer)

pjaca

New member
Local time
Yesterday, 23:26
Joined
Jan 8, 2019
Messages
5
I have this problem:
cannot set the sub-pages to refresh with the current record number from the previous form on select, and when proceeding to the next tab, current record is not changed (multitab form with a few separate subforms opening in tabs)
tried varius procedures when on focus but failed... please advise!
 

June7

AWF VIP
Local time
Yesterday, 22:26
Joined
Mar 9, 2014
Messages
5,424
Forms have relationship? Are Master/Child Links properties set? Don't really understand the issue. If you want to provide db for analysis, follow instructions at bottom of my post.
 

pjaca

New member
Local time
Yesterday, 23:26
Joined
Jan 8, 2019
Messages
5
Thanks for the quick reply!
Click START in forms, you'll see a bunch of subforms where data originate from the same set, but the form was devided into sub forms for clarity. When you navigate between the tabs, current record number is retained on each sub-tub and does not change when moving to a different tab, which is confusing, since you have to work in one tab on record #1, the other #15 i.e. ... Was trying to write a procedure to change the record number when switching the tabs, but the last time had to work with MsA was like 15 years ago and I got a bit stiff during that time... Any help appreciated!
 

Attachments

  • v3.zip
    138.2 KB · Views: 47

June7

AWF VIP
Local time
Yesterday, 22:26
Joined
Mar 9, 2014
Messages
5,424
Why would each tab be a different record number?

Multiple similar name fields like w1_Diureza, w2_Diureza, w3_Diureza, w4_Diureza indicates a non-normalized data structure. There will never be 5 or more visits? Should be another table for Visits. Each visit would be a record. Then should be a main form bound to Cewinki and a related subform for entering visit records.
 

pjaca

New member
Local time
Yesterday, 23:26
Joined
Jan 8, 2019
Messages
5
The whole data set is in one table, multitab user-oriented, but when you switch between the tabs, the record number does not change in one tab if changed in other tab. That's what the procedure should do. Change record number in the selected tab according to the previous one just edited. See for yourself. If you proceed to next record in one tab, the next tab record number is still as edited before - will not change automatically, as I intended...
 

June7

AWF VIP
Local time
Yesterday, 22:26
Joined
Mar 9, 2014
Messages
5,424
Okay, I misunderstood, thought you were wanting them to be on different records.

So don't use subforms. Set the main form RecordSource to Cewinki and arrange controls directly on pages of tab control.

Still a non-normalized data structure.
 

pjaca

New member
Local time
Yesterday, 23:26
Joined
Jan 8, 2019
Messages
5
Too complicated to put on one scrolled-down form. Tabs give some room on the screen. Need that procedure to refresh next tab with a record number from the previous when focus change...
 

JHB

Have been here a while
Local time
Today, 07:26
Joined
Jun 17, 2012
Messages
7,732
I don't think you understand what June7 suggested, so I've made a example for you open the attached database and open the form JHBSTART, the 3 first tabs are changed.
 

Attachments

  • v3.zip
    175 KB · Views: 36

pjaca

New member
Local time
Yesterday, 23:26
Joined
Jan 8, 2019
Messages
5
Thank you. As I said, got some rust in my wheels;) Couldn't get through it without this few lines of a code;) Once again thank you for your time and experience!
 

Users who are viewing this thread

Top Bottom