Problems binding querys to reports.

  • Thread starter Thread starter James
  • Start date Start date
J

James

I have a query that returns about 25 fields of info for a
single record number. The first part of the query
prompts for a record number. I want to make a report
that when I open it it prompts me for the record number
then displays all the info in a two page report that is
neat and tidy and printer friendly. What is the easiest
way to do this? I do allright with forms but have just
started with reports. All I know is that the wizzard
stinks for this.

James
 
If the query you created to prompt for a record number has all the necessary
fields that will be used in your report you can use that query also for your
report source. If the query does not have all the fields then make a copy of
the other query, add the fields you need and then set the following
statement in the 'criteria' box under 'Record Number'.

Like [Enter the Record Number] & *

This will allow the user to enter a specific record number or just press
enter and get all the records.
 
The query works fine. I am only using it for one record
at a time. IT gives me all the data for that record that
is in the three tables. I just want to put the query in
a nice pretty format on a form that I can print. When I
manually put in a text box with that query as the sorce
it no longer asks for the record number like it does when
I just run the query. how can I fix this?
-----Original Message-----
If the query you created to prompt for a record number has all the necessary
fields that will be used in your report you can use that query also for your
report source. If the query does not have all the fields then make a copy of
the other query, add the fields you need and then set the following
statement in the 'criteria' box under 'Record Number'.

Like [Enter the Record Number] & *

This will allow the user to enter a specific record number or just press
enter and get all the records.


James said:
I have a query that returns about 25 fields of info for a
single record number. The first part of the query
prompts for a record number. I want to make a report
that when I open it it prompts me for the record number
then displays all the info in a two page report that is
neat and tidy and printer friendly. What is the easiest
way to do this? I do allright with forms but have just
started with reports. All I know is that the wizzard
stinks for this.

James


.
 
It sounds like you could get a lot more mileage out of your Reports.

Firstly, you've been given a pretty good clue as to what to enter in the
criteria line in the QBE grid for the query for that one-record report.

Is your application designed such that you get to some point at which you
want to only print one record? Or is it that you want to print all of the
records but haven't yet worked out how to get the report to do that for you?

If you have a form open with the record open that you will want to print
then I'd put a command button on that form titled something like Print
Record. In the code behind that command button I'd use something like
Docmd.OpenReport"(MyReport"). In the QBE grid for the query for MyReport
in the column for RecordNumber put something like:

Like Forms!MyCurrentForm!RecordNumberTextBox

Note that your form has to stay open for this to work.

HTH
--
-Larry-
--

The query works fine. I am only using it for one record
at a time. IT gives me all the data for that record that
is in the three tables. I just want to put the query in
a nice pretty format on a form that I can print. When I
manually put in a text box with that query as the sorce
it no longer asks for the record number like it does when
I just run the query. how can I fix this?
-----Original Message-----
If the query you created to prompt for a record number has all the necessary
fields that will be used in your report you can use that query also for your
report source. If the query does not have all the fields then make a copy of
the other query, add the fields you need and then set the following
statement in the 'criteria' box under 'Record Number'.

Like [Enter the Record Number] & *

This will allow the user to enter a specific record number or just press
enter and get all the records.


James said:
I have a query that returns about 25 fields of info for a
single record number. The first part of the query
prompts for a record number. I want to make a report
that when I open it it prompts me for the record number
then displays all the info in a two page report that is
neat and tidy and printer friendly. What is the easiest
way to do this? I do allright with forms but have just
started with reports. All I know is that the wizzard
stinks for this.

James


.
 
I have a form with 3 tab in a control to save space. I
wrote the query that as soon as I open it it displays
Type in the record number. Then when I do it shows all
of the information for that record. it is about 20
fields some with as much as 255 characters. What I want
to know is how to bind that query to a report so that
after I am done formating the whole thing it will give me
a nice pretty report with a letter head and plenty of
room for all the stuff I want to print. I also want it
to prompt me for a record number as soon as I open it.
Or is there a better way?

James
 
Back
Top