Refreshing a subform using Criteria (1 Viewer)

Locopete99

Registered User.
Local time
Today, 06:45
Joined
Jul 11, 2016
Messages
163
Hi,

Im trying to create a form with two sub forms.

The first one is a list of activities that need to be done today. This is a series of records with ID numbers.

The second is a form showing the details of the record.

Can you tell me if the below is possible:

1) You click the hyperlink within subform 1 to refresh subform 2 (Simple so far)
2) Subform 2 refreshes and uses the ID number of the clicked record to populate it.

Basically id like to use the criteria from "DoCmd.OpenForm "Frm_debt", acNormal, , "ID=" & Me.Id" and use it on the requery or on load statements.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 06:45
Joined
Oct 29, 2018
Messages
21,357
Hi. I read both questions as being the same. But in any case, I think what you're asking is possible.
 

Locopete99

Registered User.
Local time
Today, 06:45
Joined
Jul 11, 2016
Messages
163
Hi,

I've attached a pic to hopefully help.

So at the top is subform 1 with hyperlinks.

When you click it, i want it to refresh sub form 2 (green middle box) using the ID from Subform 1.

Do you have an idea on how to do it?
 

Attachments

  • Example.png
    Example.png
    22.1 KB · Views: 65

theDBguy

I’m here to help
Staff member
Local time
Today, 06:45
Joined
Oct 29, 2018
Messages
21,357
Sure. Have you tried simply linking the subform to the main form using the appropriate fields (ID)?
 

Locopete99

Registered User.
Local time
Today, 06:45
Joined
Jul 11, 2016
Messages
163
Hi,

I've tried the open form, but obviously that opens a new form, not refreshing the other.

I've tried to link it through a blank text field but no, nothings working.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 06:45
Joined
Oct 29, 2018
Messages
21,357
Hi,

I've tried the open form, but obviously that opens a new form, not refreshing the other.

I've tried to link it through a blank text field but no, nothings working.
But have you tried linking them using a common field from both tables? In other words, how are the two related? Use that field.
 

Locopete99

Registered User.
Local time
Today, 06:45
Joined
Jul 11, 2016
Messages
163
Hi Sorry,

I think there i havent explaoined right. So both subforms are from the same table.
Subform 1 is from a query that displays items that need to be acted upon today. Subform two shows the in depth details of the record, so who what where and notes etc.

When i said i tried to link it using a blank text field I tried the following:

Subform1 - On click update blank text field with Me.id

Subform2 - Me.if=Forms!frm_Wdebt!Text4
 

theDBguy

I’m here to help
Staff member
Local time
Today, 06:45
Joined
Oct 29, 2018
Messages
21,357
Hi Sorry,

I think there i havent explaoined right. So both subforms are from the same table.
Subform 1 is from a query that displays items that need to be acted upon today. Subform two shows the in depth details of the record, so who what where and notes etc.

When i said i tried to link it using a blank text field I tried the following:

Subform1 - On click update blank text field with Me.id

Subform2 - Me.if=Forms!frm_Wdebt!Text4
Hi. If the main and subform are bound to the same table, then just use the ID field to link the two, and it should work like you wanted.
 

Users who are viewing this thread

Top Bottom