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

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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
 
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.
 

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

Back
Top