The only way you can do this is by setting up some VB Code behind
your report.
An example of code i have used before is shown below.
Function SetupReportsSQL(sFieldname As String, sTblField As String)
As String
'*********** Form field = sFieldname **************
'*********** tbl field = sTblField ****************
iLoop = 0
For i = 0 To Form_frm_reports(sFieldname).ListCount - 1
If Form_frm_reports(sFieldname).Selected(i) Then
iLoop = iLoop + 1
If iLoop = 1 Then
sSQL = sSQL & " AND ("
sSQL = sSQL & " [" & sTblField & "]= " & Form_frm_reports
(sFieldname).Column(0, i) & ""
Else
sSQL = sSQL & " or [" & sTblField & "]= " &
Form_frm_reports(sFieldname).Column(0, i) & ""
End If
End If
Next i
If iLoop > 0 Then sSQL = sSQL & ")"
SetupReportsSQL = sSQL
End Function
If you dont understand how to use the above code, feel free to email
me a copy of your database, and i'll try and help further.
--- In [email protected], Beulah Florence
<[EMAIL PROTECTED]> wrote:
>
> I have a table "Project". There is a field Project name and some
other fields that have a boolean value/check box values. The user
needs to have an option of choosing the field that should be queried
upon. For example the fields, I am talking abt are: F1, F2, F3, F4. I
will have these as the value list for Combo box. And When the user
selects one of it, will I be able to display all those project names
that have a true value for that particular field.
>
> A smile is the light in your window that tells others that there is
a caring, sharing person inside.Keep SMILING.
>
>
>
> ----- Original Message ----
> From: rchlon9 <[EMAIL PROTECTED]>
> To: [email protected]
> Sent: Thursday, June 28, 2007 3:06:12 PM
> Subject: [Access VBA Central] Re: Field Level Queries
>
> Can you explane your question in a little more detail, i am sure
what
> you are trying to achieve is possible but i need to understand
better
> what exactly you need before advising you more.
>
> --- In AccessVBACentral@ yahoogroups. com, Beulah Florence
> <itssmily@ .> wrote:
> >
> > Can I perform a query using an input from the user as a field on
> which the query is written?
> >
> > It is very urgent. Please respond quickly if anyone can help.
> >
> > Florence
> >
> > A smile is the light in your window that tells others that there
is
> a caring, sharing person inside.Keep SMILING.
> >
> >
> >
> >
> ____________ _________ _________ _________ _________ _________ _
> ____________ __
> > Be a better Heartthrob. Get better relationship answers from
> someone who knows. Yahoo! Answers - Check it out.
> > http://answers. yahoo.com/ dir/?link= list&sid= 396545433
> >
> > [Non-text portions of this message have been removed]
> >
>
>
>
>
>
>
______________________________________________________________________
______________
> Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s
user panel and lay it on us.
http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
>
>
> [Non-text portions of this message have been removed]
>