HELP!!!!!! External Reports Problem!!!!

M

Mike

I have three databases a front end app database, a backend tables
database and a reports database. I have sucessfully opened my reports
in the external database, however the report refrences a date range on
an open form within my front end app. When the report is opened in the
reports db it cannot see the open form in the frond end app. I am
stumped as to how I can refrence the front end app database (open
form) once (or from) the call is made to the external database report?
The Record Source is a query...
Any help is appreciated.
 
D

Duane Hookom

How about writing your date range values to a table that can be shared
between the mdbs. Use the table values as criteria in your query.
 
M

Mike

Duane,

Sounds Like a reasonable idea, however I have no tables in the "rpts"
MDB. Do you recommend that I link them somehow?? The reports run on
queries that call specific tables in the core mdb using the "in"
statement. I was hoping that I could just refrence the open form in
the front end app, in the query that runs the report....somehow, just
like the in statement refrences the other mdb... Sometimes confusing
to have 3 apps, however it makes life VERY easy for me when my end
users want to create custom reports, and I have the front end app
locked into an MDE..

Thanks
Mike
 
D

Duane Hookom

Your reports must be getting the records from somewhere. Where ever that is,
add a table for your criteria values.
 
M

Michael

Duane,

The records come from the front end app. I am running a query script
in the on load event of the report which specifies the front end app
using an "in" statement. I have 2 parameters which are pulled from an
open form in the front end app (which launches the report), these are
"bdate" and "edate" these values are what tells the query which data
range I need. I anm looking for a "special" way to either have the
reports recordsource call a query in the front end app or have the sql
statement in the reports app somehow call the the values from the front
end app in the open form... I have included the sql statement below:

'strSQL = "SELECT tblInjuryReport.[Injury ID], tblInjuryReport.IDNO,
tblInjuryReport.[Injury Date], [qry Staff Assignments and
Addresses].[Years on Job], tblInjuryReport.Battalion FROM
tblInjuryReport , [qry Staff Assignments and Addresses] In
'C:\Documents and Settings\BALTRM.000\My
Documents\Databases\VCIR\Database_File\VCIR.MDB' WHERE
(((tblInjuryReport.[Injury Date]) Between
[forms]![frmInjRptDateRange]![BDate] And
[forms]![frmInjRptDateRange]![EDate]) AND
((tblInjuryReport.Battalion)=[Forms]![frmInjRptDateRange]![Batt])) In
'C:\Documents and Settings\BALTRM.000\My
Documents\Databases\VCIR\Database_File\VCIR.MDB'ORDER BY [qry Staff
Assignments and Addresses].[Years on Job];"
 
D

Duane Hookom

Are you suggesting that you can't update two fields in a single table in
VCIR.MDB prior to running the report?

--
Duane Hookom
MS Access MVP
--

Michael said:
Duane,

The records come from the front end app. I am running a query script
in the on load event of the report which specifies the front end app
using an "in" statement. I have 2 parameters which are pulled from an
open form in the front end app (which launches the report), these are
"bdate" and "edate" these values are what tells the query which data
range I need. I anm looking for a "special" way to either have the
reports recordsource call a query in the front end app or have the sql
statement in the reports app somehow call the the values from the front
end app in the open form... I have included the sql statement below:

'strSQL = "SELECT tblInjuryReport.[Injury ID], tblInjuryReport.IDNO,
tblInjuryReport.[Injury Date], [qry Staff Assignments and
Addresses].[Years on Job], tblInjuryReport.Battalion FROM
tblInjuryReport , [qry Staff Assignments and Addresses] In
'C:\Documents and Settings\BALTRM.000\My
Documents\Databases\VCIR\Database_File\VCIR.MDB' WHERE
(((tblInjuryReport.[Injury Date]) Between
[forms]![frmInjRptDateRange]![BDate] And
[forms]![frmInjRptDateRange]![EDate]) AND
((tblInjuryReport.Battalion)=[Forms]![frmInjRptDateRange]![Batt])) In
'C:\Documents and Settings\BALTRM.000\My
Documents\Databases\VCIR\Database_File\VCIR.MDB'ORDER BY [qry Staff
Assignments and Addresses].[Years on Job];"



Duane said:
Your reports must be getting the records from somewhere. Where ever that is,
add a table for your criteria values.
 

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