Sub form to store value from the form (1 Viewer)

aman

Registered User.
Local time
Today, 08:40
Joined
Oct 16, 2008
Messages
1,250
Hi guys,

I have been trying to resolve the issue but no luck . I have a form and there is a sunform within it . So I want to store the value of ‘DocCheckId’ text box from the form to ‘FormRef’ within subform. It is storing 0 for each entry in the sub form at the moment .

Any help will be much appreciated .

Thanks
 

Minty

AWF VIP
Local time
Today, 15:40
Joined
Jul 26, 2013
Messages
10,354
Is FormRef the child Foreign Key for the DocCheckID pk in the main form data?

Is so simply set it to the Link child Field in the subform container to FormRef and the Link Master Field to DocCheckID
 

aman

Registered User.
Local time
Today, 08:40
Joined
Oct 16, 2008
Messages
1,250
I have defined master child relationship but it's still showing 0 value for each 'FormRef'.

My subform is bound and linked to a table 'tblQARemedial' but my form is unbound so when the user selects 1st control then data gets saved down in master table and it gives unique reference number (this one I am using in master field and the child is linked to 'FormRef')

Thanks
 

Minty

AWF VIP
Local time
Today, 15:40
Joined
Jul 26, 2013
Messages
10,354
Try setting the subform to Filter On Empty Master property to yes to hide the subform when there is no matching record?
 

aman

Registered User.
Local time
Today, 08:40
Joined
Oct 16, 2008
Messages
1,250
So what's happening is that it gives me the right reference in 'FormRef' in the subform but as the subform is continuous so when the focus is moved to the next record then 'FormRef' in the first record goes disappeared.
 

Cronk

Registered User.
Local time
Tomorrow, 02:40
Joined
Jul 4, 2013
Messages
2,770
If the parent form is unbound, what are you using as the master field in the link relationship?
 

Mark_

Longboard on the internet
Local time
Today, 08:40
Joined
Sep 12, 2017
Messages
2,111
Please let me know if this clarified exactly what you want to happen:
You have an unbound form.
On your unbound form, you have a subform to show records. When you make a change to an unbound control on your form you want to update all records shown in the subform?

If this is the case, you would need to have an update query (or similar) to go ahead and do the actual work of updating the records in the table.
 

Users who are viewing this thread

Top Bottom