The SQL for the query on which my subform is based is as
follows:
SELECT tblOracleAccountHeader.Hyperion_Account,
tblOracleAccountHeader.AcctAcctType AS
tblOracleAccountHeader_AcctAcctType,
tblOracleAccountHeader.Account_Description,
tblOracleDetail.Date, tblOracleDetail.Co,
tblOracleDetail.AcctAcctType AS
tblOracleDetail_AcctAcctType,
tblOracleDetail.Prior_Amount,
tblOracleDetail.Current_Amount, tblOracleDetail.[Variance
Explanation]
FROM tblOracleAccountHeader INNER JOIN tblOracleDetail ON
tblOracleAccountHeader.AcctAcctType =
tblOracleDetail.AcctAcctType;
The problem I'm having is this: If I put a parameter in
the query, it asks again each time I move to a new record
in the main form. What I want is to be able to filter the
subform upon entering. I've tried several methods,
DoCmd.ApplyFilter, DoCmd.OpenForm (setting the filter),
but it doesn't work. Here's one example of the code I've
tried:
Dim MyCoSelection As String
MyCoSelection = InputBox("Choose your company...", "Choose
Company Input Box", "301", 100, 100)
DoCmd.ApplyFilter , "Forms!
frmHyperionHeaderWQueryAsSubform!
frmOracleHeaderAndDetailSubform!Co = MyCoSelection"
Any help you can give me would be greatly appreciated.
Thanks
Keith Lorenzen
(e-mail address removed)
-----Original Message-----
Keith-
What's the SQL of the query you're using in the subform? What VBA code are
you trying to use to filter the subform?
--
John Viescas, author
"Microsoft Office Access 2003 Inside Out" (coming soon)
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/
(Microsoft Access MVP since 1993)
.