Form Field Numbering (1 Viewer)

Pete490h

New member
Local time
Today, 01:39
Joined
Jan 18, 2021
Messages
25
Please see attached photo

E139C7EA-FB3B-43A0-9787-9C3C4946FC9B.jpeg
I have two questions thanks

Firstly, on datasheet subform (Feature Information) to action as follows.....

The first field (No) in the first row wants to start as #1, then I need the second row LineNo to be #2, third row LineNo #3 and so on
Currently I enter these manually but wonder if anyone has similar which updates on new row entry

Secondly, on datasheet subform (Component Result), after entry of the number (red on green), an after update event runs and this form copies the line numbers created in the previous Feature Information subform to this form
The question I have here is whether it is possible for both forms to move in tandem vertically when I enter a new row which scrolls into the for display window in the Component Result subform
I have to have two separate subforms as there can be multiples of components

hope the above is clear😬
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 01:39
Joined
Jul 9, 2003
Messages
12,654
Sounds like you might need Rogers Access library sample database on numbering a query:-

 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 20:39
Joined
Feb 19, 2002
Messages
31,482
You seem to be depicting a 1-1 relationship. Each feature gets tested once and only once. Is that the actual situation? If the relationship is 1-m which would be more normal, then the number you want to assign is not meaningful. When you click on a feature, the subform to the right should show only the tests for that feature. We can help you to do that if that is what you really want.
 

Pete490h

New member
Local time
Today, 01:39
Joined
Jan 18, 2021
Messages
25
You seem to be depicting a 1-1 relationship. Each feature gets tested once and only once. Is that the actual situation? If the relationship is 1-m which would be more normal, then the number you want to assign is not meaningful. When you click on a feature, the subform to the right should show only the tests for that feature. We can help you to do that if that is what you really want.
Hi Pat,
Yes 1.1 thanks
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 01:39
Joined
Sep 12, 2006
Messages
14,413
if it's 1 to 1, then why not just keep all the values in the same table?
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 20:39
Joined
Feb 19, 2002
Messages
31,482
My opinion exactly:) There is no reason for a separate table.
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 20:39
Joined
Feb 19, 2002
Messages
31,482
You said that there was only ONE test ever for each component. That is a 1-1 relationship and all things being equal, should not be implemented with two tables. Just put the test fields in the main table.
 

Pete490h

New member
Local time
Today, 01:39
Joined
Jan 18, 2021
Messages
25
You said that there was only ONE test ever for each component. That is a 1-1 relationship and all things being equal, should not be implemented with two tables. Just put the test fields in the main table.
It’s so difficult to show the exact scenario required but I need to obtain a report that shows the feature data along with the component data to its right, all in line etc
See photo
7A680EB8-C6E5-491B-9044-B85445C38E3E.jpeg
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 20:39
Joined
Feb 19, 2002
Messages
31,482
So the relationship is NOT 1-1.

Forget about the numbering in the feature record. This is a 1-m relationship and the PK of the feature table becomes the FK in the test table. You can add a sequence number in the test table if you want although you don't technically need it. I'll upload a sample that shows you how to generate one.

The report you are looking for can be made by using two cross tab queries and joining them. Crosstabs can only pivot a single field so you do one for Actual and the second for Notes. Joining them gets you something like the above.
 

Pete490h

New member
Local time
Today, 01:39
Joined
Jan 18, 2021
Messages
25
So the relationship is NOT 1-1.

Forget about the numbering in the feature record. This is a 1-m relationship and the PK of the feature table becomes the FK in the test table. You can add a sequence number in the test table if you want although you don't technically need it. I'll upload a sample that shows you how to generate one.

The report you are looking for can be made by using two cross tab queries and joining them. Crosstabs can only pivot a single field so you do one for Actual and the second for Notes. Joining them gets you something like the above.
Pat, I’d really appreciate that thanks

btw what’s PK & FK, probably obvious but maybe a brain freeze😉
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 20:39
Joined
Feb 19, 2002
Messages
31,482
Sorry. I forgot to attach this earlier. It shows a couple of different uses for custom numbering.
 

Attachments

  • CustomSequenceNumber20201020c.zip
    85.6 KB · Views: 23

Pete490h

New member
Local time
Today, 01:39
Joined
Jan 18, 2021
Messages
25
So the relationship is NOT 1-1.

Forget about the numbering in the feature record. This is a 1-m relationship and the PK of the feature table becomes the FK in the test table. You can add a sequence number in the test table if you want although you don't technically need it. I'll upload a sample that shows you how to generate one.

The report you are looking for can be made by using two cross tab queries and joining them. Crosstabs can only pivot a single field so you do one for Actual and the second for Notes. Joining them gets you something like the above.
Hi Pat,
just about to try the two crosstabs but can you help what settings i use for the NOTES on as the field is text
thanks
 

Pete490h

New member
Local time
Today, 01:39
Joined
Jan 18, 2021
Messages
25
Hi Pat,
just about to try the two crosstabs but can you help what settings i use for the NOTES on as the field is text
thanks
Hi again Pat,
please ignore my previous message, I just searched on the site and found previous question and answer(y)
 

Users who are viewing this thread

Top Bottom