create report based on form..

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

Guest

Hi,

How can I create a report based on the selections made in the form where I
have dropdown, checkboxes fields?

I tried creating a query based on the criteria and when I preview my report
it displays the dialog window where it asks the user to enter the criteria
for each field. And I have more than 10 check boxes in the form so it asks me
10 times (it displays dialog box for 10 different check boxes plus other
fileds I have with teh criteria on it) to enter the criteria I am looking
for...

Is there any way that instead of displaying the dialog boxes and entering
the criteria , report is created just based on the selections I made in the
form? Because I don't want to enter criteria more than 10 times to get the
report?

I would appreciate your help. Your help is urgently needed.

Thanks in advance.
 
Anna,

Just change the query the report is based on so it reads the criteria
directly from the form (where you currently have [enter criteria]), like:

Forms![FormName]![ControlName]

or

Like Forms![FormName]![ControlName] & "*"

etc, substituting the appropriate form and control names.

HTH,
Nikos
 
Nikos:
Following is the sql code for my query:

SELECT [Main Table].[Full-Time/Intrmittent], [Main Table].[Last Name], [Main
Table].[First Name], [Main Table].[Job Location], [Main Table].BA, [Main
Table].BS, [Main Table].MA, [Main Table].MS, [Main Table].PhD, [Main
Table].MD, [Main Table].MPH, [Main Table].JD, [Main Table].AA, [Main
Table].AS, [Main Table].RN, [Main Table].[Job Grade]
FROM [Main Table]
WHERE ((([Main Table].[Job Location])=[Please enter Job Location:]) AND
(([Main Table].BA)=[Forms]![MainForm]![BA]) AND (([Main
Table].BS)=[Forms]![MainForm]![BS]) AND (([Main
Table].MA)=[Forms]![MainForm]![MA]) AND (([Main
Table].MS)=[Forms]![MainForm]![MS]) AND (([Main
Table].PhD)=[Forms]![MainForm]![PhD]) AND (([Main
Table].MD)=[Forms]![MainForm]![MD]) AND (([Main
Table].MPH)=[Forms]![MainForm]![MPH]) AND (([Main
Table].JD)=[Forms]![MainForm]![JD]) AND (([Main
Table].AA)=[Forms]![MainForm]![AA]) AND (([Main
Table].AS)=[Forms]![MainForm]![AS]) AND (([Main
Table].RN)=[Forms]![MainForm]![RN]));

So..in where statement I did change for example:
(([Main Table].controlname)=[Forms]![MainTEST]![controlname])

Here, Main Table is the table name and MainTEST is teh form where I am
making selections for the report. I tried this but no luck..then I also tried
changing this to:

(([MainTEST].controlname)=[Forms]![MainTEST]![controlname])

but its not doing what I want to do..

Please help me..and tell me what I am doing wrong....

Thanks

Nikos Yannacopoulos said:
Anna,

Just change the query the report is based on so it reads the criteria
directly from the form (where you currently have [enter criteria]), like:

Forms![FormName]![ControlName]

or

Like Forms![FormName]![ControlName] & "*"

etc, substituting the appropriate form and control names.

HTH,
Nikos

Anna said:
Hi,

How can I create a report based on the selections made in the form where I
have dropdown, checkboxes fields?

I tried creating a query based on the criteria and when I preview my report
it displays the dialog window where it asks the user to enter the criteria
for each field. And I have more than 10 check boxes in the form so it asks me
10 times (it displays dialog box for 10 different check boxes plus other
fileds I have with teh criteria on it) to enter the criteria I am looking
for...

Is there any way that instead of displaying the dialog boxes and entering
the criteria , report is created just based on the selections I made in the
form? Because I don't want to enter criteria more than 10 times to get the
report?

I would appreciate your help. Your help is urgently needed.

Thanks in advance.
 
Hi Anna,

If you send me a private e-mail message, with a valid return address, I will send you a working
sample. My e-mail address is pretty easy to figure out (a direct reply to this message won't
work). Whatever you do, please do not post your e-mail address in a message to the group. Sorry,
I don't have a web site where I can post this sample and just provide you with a link.

Tom
____________________________________


Hi,

How can I create a report based on the selections made in the form where I
have dropdown, checkboxes fields?

I tried creating a query based on the criteria and when I preview my report
it displays the dialog window where it asks the user to enter the criteria
for each field. And I have more than 10 check boxes in the form so it asks me
10 times (it displays dialog box for 10 different check boxes plus other
fileds I have with teh criteria on it) to enter the criteria I am looking
for...

Is there any way that instead of displaying the dialog boxes and entering
the criteria , report is created just based on the selections I made in the
form? Because I don't want to enter criteria more than 10 times to get the
report?

I would appreciate your help. Your help is urgently needed.

Thanks in advance.
 
Tom,
I tried to send you email to the add I thought might be yours. But no luck..
If you don't mind I can give you mine if you say so..
Let me know. Thanks
 
Hi Anna,

AOS168 AT @comcast DOT net

Remove the word "AT".
Substitute the word "DOT" with a period.
Remove all spaces.

The resulting e-mail address should be 18 characters in length with all spaces removed. Sorry,
that I cannot simply post it here--I don't want to make it too easy for the spammers to harvest
my e-mail address.

Tom

PS. I'm leaving for work now, so I won't be around to check for messages until later on tonight.

____________________________________

Tom,
I tried to send you email to the add I thought might be yours. But no luck..
If you don't mind I can give you mine if you say so..
Let me know. Thanks
 
Anna,

You are on the right track, but not sure whether you are using the correct
form name; in the SQL it reads MainForm, then you say MainTEST. Which is the
correct one? Make sure the names in the references are correct (both the
form name and the control names). If one is not, then you will receive an
inputbox asking a value for the parameter when you run the query, so you
know the reference is not correct.
Also, you seem to have left out the location, which is still requested from
the user through an inputbox(?).
Another thing that might pose a problem is the parentheses which, given the
length of the SQL statement, are hard to check. Try removing them all, it
won't make a change in the logic of the expression.
Needless to say, the form must be open when you run the query (or you will
receive inputboxes requesting values for all parameters), and all controls
must be populated with valid values, or the query will return no record.
If it still doesn't work, tell me exactly what the problem is: no record
returned; records returned but not as expected; an error message (what)?

HTH,
Nikos

Anna said:
Nikos:
Following is the sql code for my query:

SELECT [Main Table].[Full-Time/Intrmittent], [Main Table].[Last Name], [Main
Table].[First Name], [Main Table].[Job Location], [Main Table].BA, [Main
Table].BS, [Main Table].MA, [Main Table].MS, [Main Table].PhD, [Main
Table].MD, [Main Table].MPH, [Main Table].JD, [Main Table].AA, [Main
Table].AS, [Main Table].RN, [Main Table].[Job Grade]
FROM [Main Table]
WHERE ((([Main Table].[Job Location])=[Please enter Job Location:]) AND
(([Main Table].BA)=[Forms]![MainForm]![BA]) AND (([Main
Table].BS)=[Forms]![MainForm]![BS]) AND (([Main
Table].MA)=[Forms]![MainForm]![MA]) AND (([Main
Table].MS)=[Forms]![MainForm]![MS]) AND (([Main
Table].PhD)=[Forms]![MainForm]![PhD]) AND (([Main
Table].MD)=[Forms]![MainForm]![MD]) AND (([Main
Table].MPH)=[Forms]![MainForm]![MPH]) AND (([Main
Table].JD)=[Forms]![MainForm]![JD]) AND (([Main
Table].AA)=[Forms]![MainForm]![AA]) AND (([Main
Table].AS)=[Forms]![MainForm]![AS]) AND (([Main
Table].RN)=[Forms]![MainForm]![RN]));

So..in where statement I did change for example:
(([Main Table].controlname)=[Forms]![MainTEST]![controlname])

Here, Main Table is the table name and MainTEST is teh form where I am
making selections for the report. I tried this but no luck..then I also tried
changing this to:

(([MainTEST].controlname)=[Forms]![MainTEST]![controlname])

but its not doing what I want to do..

Please help me..and tell me what I am doing wrong....

Thanks

Nikos Yannacopoulos said:
Anna,

Just change the query the report is based on so it reads the criteria
directly from the form (where you currently have [enter criteria]), like:

Forms![FormName]![ControlName]

or

Like Forms![FormName]![ControlName] & "*"

etc, substituting the appropriate form and control names.

HTH,
Nikos

Anna said:
Hi,

How can I create a report based on the selections made in the form where I
have dropdown, checkboxes fields?

I tried creating a query based on the criteria and when I preview my report
it displays the dialog window where it asks the user to enter the criteria
for each field. And I have more than 10 check boxes in the form so it
asks
me
10 times (it displays dialog box for 10 different check boxes plus other
fileds I have with teh criteria on it) to enter the criteria I am looking
for...

Is there any way that instead of displaying the dialog boxes and entering
the criteria , report is created just based on the selections I made
in
the
form? Because I don't want to enter criteria more than 10 times to get the
report?

I would appreciate your help. Your help is urgently needed.

Thanks in advance.
 
Back
Top