The field where the user chooses a table field name could also be a combobox
that has a recordsourcetype Field List. The choose the appropriate table for
the list. Use the combobox value in the SQL example already provided.
Mike Storr
www.veraccess.com
"Bas Cost Budde" <bas@heuveltop.org> wrote in message
news:bvb9mq$k2c$1@news2.solcon.nl...[color=blue]
> Compose the SQL for the query from code.
>
> Suppose your field name control is called fldNam, and the field value
> control is fldValue. You could get at something like
>
> dim cSQL as string
> cSQL = "SELECT * FROM yourTable WHERE " & fldName & " = '" & fldValue &[/color]
"'"[color=blue]
>
> To view the resulting dataset, you could create a query on it.
>
> RICHARD BROMBERG wrote:
>[color=green]
> > Well I thought I knew how to run a query where the value of a PARTICULAR
> > field is entered
> > into a text box, BUT I WAS WRONG.
> >
> > I had done this in the past but don't remember how I did it. .
> >
> > "RICHARD BROMBERG" <dickbrom@worldnet.att.net> wrote in message
> > news:8F8Sb.134747$6y6.2621079@bgtnsc05-news.ops.worldnet.att.net...
> >[color=darkred]
> >>I am using MS Access 2000 and crating an application where the main[/color][/color][/color]
table[color=blue][color=green][color=darkred]
> >>has about 90 fields.
> >>I understand how to run a where the value of a PARTICULAR field is[/color][/color][/color]
entered[color=blue][color=green][color=darkred]
> >>into a text box.
> >>
> >>I want to allow the user to enter the FIELD into one text box and the
> >>CRITERIA into another text box and then run a query based on the values
> >>entered.
> >>
> >>I'd appreciate any ideas how to do this
> >>
> >>Thanks
> >>
> >>
> >>
> >>
> >>[/color]
> >
> >
> >[/color]
>
> --
> Bas Cost Budde
>[/color]