Form to Report

M

Mr-Re Man

I have a form that includes a continuous subform. Within that subform is a
field called (contractno_txt). At the end of that row, I have included a
button that links to a report.

The report includes the field (contractno_txt), I am trying to link the two
together so that only the matching staff assigned to that contract appear in
the report.

I have searched for various threadds within the discussions, but nothing
matches what I need. Should I be looking at it another way perhaps or I am
missing out something simple?

regards
 
B

bhicks11 via AccessMonster.com

In the data source for the report add a filter that refers to the control on
the subform (or base the report on a query that does the same).

contractno_txt = forms!myform.mysubform!form.contractno_txtcontrol

Bonnie
http://www.dataplus-svc.com
 
M

Mr-Re Man

This is my code: contractno_txt =
forms!frm_schools.subfrm_schools_contracts!form.contractno_txt but i get an
error once I press the button the subform which indicates:
ENTER PARAMETER VALUE, then it displays the code abvoe and a blank line to
enter a value.

Any ideas?

Thanks so far though
 
B

bhicks11 via AccessMonster.com

Oops, should be:
forms!frm_schools!subfrm_schools_contracts.form!contractno_txt

Bonnie
http://www.dataplus-svc.com

Mr-Re Man said:
This is my code: contractno_txt =
forms!frm_schools.subfrm_schools_contracts!form.contractno_txt but i get an
error once I press the button the subform which indicates:
ENTER PARAMETER VALUE, then it displays the code abvoe and a blank line to
enter a value.

Any ideas?

Thanks so far though
In the data source for the report add a filter that refers to the control on
the subform (or base the report on a query that does the same).
[quoted text clipped - 17 lines]
 
M

Mr-Re Man

I did it, after playing around with the previous code I managed to get it
working, the code I used was:

contractno_txt =
[forms]![frm_schools].[subfrm_schools_contracts]![contractno_txt]

instead of

contractno_txt =
forms!frm_schools.subfrm_schools_contracts!form.contractno_txt
 
J

John W. Vinson

I have a form that includes a continuous subform. Within that subform is a
field called (contractno_txt). At the end of that row, I have included a
button that links to a report.

The report includes the field (contractno_txt), I am trying to link the two
together so that only the matching staff assigned to that contract appear in
the report.

I have searched for various threadds within the discussions, but nothing
matches what I need. Should I be looking at it another way perhaps or I am
missing out something simple?

regards

The syntax for referencing a control on a subform is a bit convoluted: you
need to reference the main form and the name of the Subform Control (which
might or might not be the same as the name of the form within that control):

Forms!mainformname!subformcontrol.Form!contractno_txt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top