On 7 Nov 2003 13:53:37 -0800, Louis wrote:
I knew if i posted a short question it wouldn't work. My fault.
Here's what i'm trying to do.
I have multiple drop down filters and based on the combination of the
drop down I want to pass that information to a parameter query and
when <<Find>> button is pressed the filtered Select record sets return
to the form. Due to the number of fields and the complexity of the
drop down selection the query is well over 255 characters long so I
cannot enter the SQL statment to the RecordSource field in the form's
data property page. ...
As Rick has pointed out already:
Max RecordSource/RowSource lengths on ...
A97: 2,048 char's
A2002: 32,750 char's
In case this is not sufficient you can always use a stored query, e.g. your
example:
"SELECT Request.RequestID, Request.ReqName, Request.ReqDesc FROM Request;"
and add the criteria like ...
Me.RecordSource = ""
CONDstr = "[MyField1]='" & Me!fldCond1 & "' " & _
" AND [MyField2]='" & Me!fldCond2 '... and so on
SQLstr = CurrentDb.QueryDefs("YourQuery").SQL
SQLstr = Left(SQLstr, Len(SQLstr) - 3) 'cut-off ; and CrLf
SQLstr = SQLstr & " WHERE " & CONDstr & 2;"
CurrentDb.QueryDefs("YourQuery").SQL = SQLstr
Me.RecordSource = "YourQuery"
(not tested)
HTH - Peter
--
No mails please.