Access Options

C

Candace

I am building queries in design view and am having an issue. I will put the
all the feilds that I need to pull from in and change the total to 'where'
for fields I will not use often. When I save the query and reopen it does not
save any of the 'where' fields. I dont want to have to add these back every
time I need them..... Any suggestions?
 
D

Duane Hookom

You would need to put something in the criteria if you want the Access query
designer to retain the fields.
 
C

Candace

So if the particular field does not require criteria then there is nothing I
can do to save the field except change the total to something else?
 
C

Candace

So if the particular field does not require criteria then there is nothing I
can do to save the field except change the total to something else?
 
J

John W. Vinson

So if the particular field does not require criteria then there is nothing I
can do to save the field except change the total to something else?

What do you want to save the field *for*? If you don't want to sum it, don't
want to group by it, don't want to use it for criteria, and don't want to
display it... what benefit is there to including it in the query?

John W. Vinson [MVP]
 
D

Duane Hookom

Correct. If you have a WHERE, don't have any criteria, and aren't showing the
column then the query designer helps you by removing the column since it
really wouldn't show up in the SQL statement.

SELECT fieldA, FieldB
FROM tblA
WHERE FieldC ...

This can't be saved since Access doesn't understand how the WHERE should be
stated: =, Like, ....
 
C

Candace

I want to save it for future use... for example I would build something where
one week I need to know what region the information is for... the next week I
need the employee ID... the following week may be something different but all
for the same set of criteria. I have a fairly standard set of pieces of
information I may gather and dont want to build a new query for each one when
the criteria will not change. It's easier to build and label all the fields
in one shot... I have a fairly extensive library I pull from.
 
C

Candace

Thanks, that makes sense.

Duane Hookom said:
Correct. If you have a WHERE, don't have any criteria, and aren't showing the
column then the query designer helps you by removing the column since it
really wouldn't show up in the SQL statement.

SELECT fieldA, FieldB
FROM tblA
WHERE FieldC ...

This can't be saved since Access doesn't understand how the WHERE should be
stated: =, Like, ....
 
S

Steve

Why not create a QueryDef and use a form to alter the query as needed.

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
[email protected]
 
Top