Re: parameter query not prompting for parameter
- From: "Tom Brophy" <TomBrophy@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 9 Aug 2005 11:19:06 -0700
The single quotes were actually put in there by Access when I entered the
'criteria', and even if I try to remove the single quotes it puts it right
back in. if I remove the single quotes directly from the SQL statement and
try to save the query, I get:
ADO error: Invalid column name 'Sales Person' (without brackets).
I cannot use the combo box because this is intended for a web page and I am
trying to pass the parameter into the query so they see their items and
nothing else. Also, when they query a specific item, I have to show the
detail items and that means I need to pass other parameters as well (IDs,
etc) - so I really have no choice but to get this working.
Thanks for your quick reply the last time. Any other ideas?
Tom Brophy
"Duane Hookom" wrote:
> Since your parameter is inside string delimiters, it is "taking the
> parameter literally as a string". Try removing the single quotes.
>
> Better yet, us a control on a form as a criteria in your query. You could
> then use a combo box of SalesPerson values.
>
> --
> Duane Hookom
> MS Access MVP
>
>
> "Tom Brophy" <TomBrophy@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:68CB628E-43DD-48CA-BBCB-BBEFEA49ACA8@xxxxxxxxxxxxxxxx
> >I am trying to create a parameter query to let me enter the sales person I
> > want to query. However, it isn't prompting and it doesn't show any
> > records
> > (like it's taking the parameter literally as a string).
> >
> > Here is the SQL query:
> > SELECT City, SalesPerson, Contact, Company, Building, SqFeet, ID
> > FROM dbo.tblOpportunity
> > WHERE (SalesPerson = '[Sales Person]')
> >
> > I'm using Access 2003 but with 2000 file format. The tables are SQL and
> > not
> > access tables.
> >
> > Any help would be appreciated.
> >
> > Thanks,
> >
> > Tom Brophy
> >
>
>
>
.
- Follow-Ups:
- Re: parameter query not prompting for parameter
- From: Duane Hookom
- Re: parameter query not prompting for parameter
- References:
- parameter query not prompting for parameter
- From: Tom Brophy
- Re: parameter query not prompting for parameter
- From: Duane Hookom
- parameter query not prompting for parameter
- Prev by Date: Returning a wildcard or value
- Next by Date: Re: query results show several "copies" of same record
- Previous by thread: Re: parameter query not prompting for parameter
- Next by thread: Re: parameter query not prompting for parameter
- Index(es):
Relevant Pages
|