Linking text box to specific subform record (1 Viewer)

ljoekelsoey4

Registered User.
Local time
Today, 22:26
Joined
Mar 16, 2017
Messages
49
I've a record-viewing form (i.e. no data entry) where I want to be able to list all the specific records for a person. The issue i've come across is that the comments box for the records are too long to be viewed in a traditional subform, so I thought about linking the specific record on the subform back to the comments box on the main form, however I'm not able to get this working.

I'd thought perhaps using the subform just to list to the record number and date, for example, and then keep the rest of the info in the main form (for no other reason than it is more aesthetic.)

I have managed to find a few pages where people with similar problems have found answers, however my VBA code isn't good enough to be able to transfer their answers over the my own database.

I'd appreciate any thoughts or ideas if you have any!

Thanks very much
 

Attachments

  • Untitled.jpg
    Untitled.jpg
    90.8 KB · Views: 49

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 22:26
Joined
Jul 9, 2003
Messages
16,245
Does that image show what you want or what you've got?
 

ljoekelsoey4

Registered User.
Local time
Today, 22:26
Joined
Mar 16, 2017
Messages
49
Does that image show what you want or what you've got?

It is what I have. The issue is that I cannot link the comments box to the specific record highlighted in the subform.

Ideally I'll put in next and previous record buttons, but that would be secondary to this issue.
 

ljoekelsoey4

Registered User.
Local time
Today, 22:26
Joined
Mar 16, 2017
Messages
49
Although they aren't liked by most of us because they aren't very flexible, this is a ideal case for the use of a split form.
https://support.office.com/en-us/article/create-a-split-form-e8eb0efb-2fa6-4315-9d4b-86e79a1fbe1e

Thanks, I can see how that would be helpful showing the records for a primary key, I've been able to manage that with the subform however, and it's the linking of those secondary records to the person record on the main form's combo so I can show the comments in a text box. cheers.
 

GinaWhipp

AWF VIP
Local time
Today, 18:26
Joined
Jun 21, 2011
Messages
5,901
Is there a common unique ID between the record at the bottom and the comments at the top? Because that would be the only way I can see to link those two, they have nothing else in common.
 

ljoekelsoey4

Registered User.
Local time
Today, 22:26
Joined
Mar 16, 2017
Messages
49
Yes, each person on the database has a unique ID which is how all the tables are linked.
 

JHB

Have been here a while
Local time
Today, 23:26
Joined
Jun 17, 2012
Messages
7,732
The issue is that I cannot link the comments box to the specific record highlighted in the subform.
Place a control in the subform for the comment, then hide it.
Set the control source for the control to show the comments in the main form to the name of the sub form + the name of the hidden control, something below, (remember to change the name!
Code:
=[SubFormName]![Acommentfield]
 

ljoekelsoey4

Registered User.
Local time
Today, 22:26
Joined
Mar 16, 2017
Messages
49
Place a control in the subform for the comment, then hide it.
Set the control source for the control to show the comments in the main form to the name of the sub form + the name of the hidden control, something below, (remember to change the name!
Code:
=[SubFormName]![Acommentfield]

works a treat, thanks very much
 

JHB

Have been here a while
Local time
Today, 23:26
Joined
Jun 17, 2012
Messages
7,732
You're welcome, good luck. :)
 

Users who are viewing this thread

Top Bottom