add select option on rpt writing to multiple queries used in sbrpt

J

JustALittleHelp

instead of modifying 4 different queries, i would like to add an 'enter here'
option to a report that writes to a 'session year' field in the queries (or
any similar concept) that are linked to the report and it's 3 subreports.
 
O

Ofer Cohen

You can create a form with objects on it

TextBox where the user input the 'session year'
A Button to open the report, on the OnClick event write

If IsNull(Me.[TextBoxName]) Then
MsgBox "Must select a session year"
Else
Docmd.OpenReport "ReportName"
End If

In the queries you can refer to the text box created

Select * From TableName Where FieldName = Forms![FormName]![TextBoxName]


I hope that what you are looking for
 
J

JustALittleHelp

Worked brilliantly. Thanks shiploads.


Ofer Cohen said:
You can create a form with objects on it

TextBox where the user input the 'session year'
A Button to open the report, on the OnClick event write

If IsNull(Me.[TextBoxName]) Then
MsgBox "Must select a session year"
Else
Docmd.OpenReport "ReportName"
End If

In the queries you can refer to the text box created

Select * From TableName Where FieldName = Forms![FormName]![TextBoxName]


I hope that what you are looking for

--
Good Luck
BS"D


JustALittleHelp said:
instead of modifying 4 different queries, i would like to add an 'enter here'
option to a report that writes to a 'session year' field in the queries (or
any similar concept) that are linked to the report and it's 3 subreports.
 
Top