Record Selector at Bottom of Form. Place or mimic that in body of subform (1 Viewer)

EmergentGuru

Registered User
Joined
Jul 21, 2016
Messages
18
Hi, I was wondering if it is possible to mimic through text box the record selector on a subform to the body of the subform in an unbound text box etc. The purpose is below:

I have a Form with a subform attached to that. We can call these "Main Form and Subform". Now the record selector in the subform for each record is unique and sequentially chronological in format naturally. (FYI the subform may be continuous where the records are displayed in vertical order. ie you can scroll down and see each different sub form line item within the main Form ID). Along with the record selector at the bottom, I would like to show each line item/record number in the form body to display that particular item number as it would show in the record selector below.

Currently the Subform Auto ID Number is in sequential order but stays connected when going from Subform record to subform records. Meaning, for example the first main record with subform would have 3 subform records numbered 1-3. But when you scroll to the next Main Form Record the subform Auto ID field number continues in that order for and for example will show the first record as 4-6 (given three records again). That does make sense to me.

What I want is an unbound text field notation that would show that same single number in the record selector in the body. The end goal would be to combine that number with a stringed unique value nomenclature identifying each particular Subform item. Example (String Facilities-01/01/15-1-1. (The date, first 1 and second 1 can change based on actual record)
 

MarkK

Super Moderator
Joined
Mar 17, 2004
Messages
7,761
enter the frankencode

The end goal would be to combine that number with a stringed unique value nomenclature identifying each particular Subform item. Example (String Facilities-01/01/15-1-1. (The date, first 1 and second 1 can change based on actual record)
What value does this add to your system? The subform item is already adequately and uniquely identified by the row's primary key, but say you go through the trouble and you achieve this result, this frankencode, OK, what have you gained?

You are . . .
1) displaying no new information
2) duplicating data
3) introducing an update dependency

So the cost is high, and the gain is?
 

EmergentGuru

Registered User
Joined
Jul 21, 2016
Messages
18
So, in the end I have a unique identifying codes for inspections (inspection/audit code) like this "Facilities-01/01/15-1-2". This will tell the user that an inspection was completd in facilities on that specific date, the 1st assessment of the day and the 2nd finding of that particular inspection item. For the user interface on forms and reports this will allow a user to identify the exact Department/Date/MainformAudit Number/Subform Audit finding) specifically. Reports will be spit out with this number for each line item as a unique inspection finding identifier which makes sense to the user, Forms will have this expression as a reference also.

To get to your question. I need this method in order to keep my Expression numbers low concerning the "1-2" Part of that nomenclature. In reality the finding number will be lower in nature and would never go into the 100's for example. The way it works now, the finding number is cumulative and will continue that way without this change. For example in reality you could have a number such as "Facilities-01/01/15-1-2000000. It will continue to grow and does not help the user. Hope this makes sense.
 

MarkK

Super Moderator
Joined
Mar 17, 2004
Messages
7,761
A set of records in a table has no order except for what order you may assert in an SQL ORDER BY clause. As such, the concept of a "first" or "second" record doesn't really make sense. You might assert a particular sort order and pick the record, at that moment, that comes up second and assign a "2" to it. But if you do that, and someone edits records, there is no guarantee that in a later sort that record would still be the second record. So the idea of storing the sequence in which rows occur is anathema to relational database common practice.

So if a sequence exists in the real world as data that defines an object that you are concenrned about, you should add a field to your table, and store that number as a dimension of the object in question.

Hope this helps,
 

EmergentGuru

Registered User
Joined
Jul 21, 2016
Messages
18
Thanks, I took your advice and just shut that project down. It would have been useful but not necessary. I am still using the string reference to each item but will accept the fact that the number will increase in aggregate. Thanks for all your help.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom