SQL - Access linked query stumper!!! check this out!!! (1 Viewer)

casey

Registered User.
Local time
Today, 05:03
Joined
Dec 5, 2000
Messages
448
Hello all,

i have a linked table in Access to SQL Server. I'm running a simple select statement in Access on the table.

select * from tblData;

When I do this it brings up a parameter pop-up to add a [dtDate] field entry in the query??? The [dtDate] field is not in the table or in the above query, but the Access is asking for it. Wierd!!! When I go into SQL Server and run the same query, viola it runs without issue.

I've relinked the tables in Access...this resolved the issue for a while, but when I try to run the query, it's doing the same thing again.

Anyone ever see this??? How bizarre!!!
 

boblarson

Smeghead
Local time
Yesterday, 21:03
Joined
Jan 12, 2001
Messages
32,059
Does the table within SQL server have a primary key? Also, when linking to Access does it ask you to tell it which field is the primary key?
 

casey

Registered User.
Local time
Today, 05:03
Joined
Dec 5, 2000
Messages
448
Hey boblarson! thanks for your reply!!!

The table does have a primary key. The way I'm linking it, I'm not specifying a primary key. I've seen that before. Should I be?

More "interesting" information. I saved a test query when working through this issue...This would cause the parameter pop-up.
Query1:
select * From tblData

After re-linking the table, Query1 was still causing the parameter pop-up.

So I tried something "unconventional", created a new query Query2
select * From tblData
same query...no errror???

I'm running the application again to see if this is still causing the error or if there was something in Access that was causing the query to hold onto something out there!!!

Let me know what you think. I'll keep you posted on how things go.

Thanks.
 

Dreamweaver

Well-known member
Local time
Today, 05:03
Joined
Nov 28, 2005
Messages
2,466
Have a look at the properties for the query as I've had something like that before and found the there was something like an order by in the properties for the query.

mick
 

casey

Registered User.
Local time
Today, 05:03
Joined
Dec 5, 2000
Messages
448
Good idea. I'm thinking that could have been the case and the original query got overwritten. I tested it out and added the field to the Order By in the properties and that didn't cause the parameter pop-up to show-up either. I'm stumped.

I will have to keep that in mind when I grab a query that's already created though.

Thanks for your ideas!
 

ssmithri

Registered User.
Local time
Today, 00:03
Joined
Oct 21, 2004
Messages
22
I have been down this road...

In my case, the query had a "manual" parameter applied. If you go to design view in the query, then to Query (on the toolbar), then Parameters, is there anything entered?

If so, delete it... and the parameter message should never appear again.
 

Users who are viewing this thread

Top Bottom