Query Problems...

G

Goobz

Hey all...

For some reason, today, I am just not able to figure this out... I
am trying to run a query against one specific table "DN". In that
table, I am trying to show simply two fields "DN.DN" (Double 50) and
"DN.Public Access" (Check Box). However, it pulls up the whole table.

I am trying to basically pull up only the records that have a check
mark in the checkbox. Here's the way I have made my query...

Field: DN Public Phone
Table: DN DN
Sort: Asc
Show: Check Check
Crite: Is Not Null


What the heck am I doing wrong!
 
M

mray

Check out your table with the checkbox values. 0 (zero) is false, and -1 is
true. If your criteria is not null then both would show up. Try criteria = -1
and you should only get the checked ones.
 
G

Goobz

Check out your table with the checkbox values. 0 (zero) is false, and -1 is
true. If your criteria is not null then both would show up. Try criteria = -1
and you should only get the checked ones.









- Show quoted text -

That worked perfectly fine, thank you!

Now, the only other problem I'm having, is it's populating more fields
than I have in my query. For the records it returns, I only want 3
fields, but am getting every field showing for that record.
 
J

John W. Vinson

Now, the only other problem I'm having, is it's populating more fields
than I have in my query. For the records it returns, I only want 3
fields, but am getting every field showing for that record.

Sounds like you're including the default "*" pseudo-field in the query
definition. Does the first column of the query grid have a * in the Field
row? If so, select the column and press the Delete key - that means "select
all fields" and it's rather rarely necessary.

John W. Vinson [MVP]
 
G

Goobz

Sounds like you're including the default "*" pseudo-field in the query
definition. Does the first column of the query grid have a * in the Field
row? If so, select the column and press the Delete key - that means "select
all fields" and it's rather rarely necessary.

John W. Vinson [MVP]

Negative... The only fields I have in the query structure are listed
in the 1st post of this message... "DN.DN" & "DN.Public". That's it.
 
J

John W. Vinson

Negative... The only fields I have in the query structure are listed
in the 1st post of this message... "DN.DN" & "DN.Public". That's it.

Please open the query in design view; select View... SQL; and copy and paste
the SQL text to a message here.

John W. Vinson [MVP]
 
G

Goobz

Please open the query in design view; select View... SQL; and copy and paste
the SQL text to a message here.

John W. Vinson [MVP]- Hide quoted text -

- Show quoted text -

You know, you were right.. I TOTALLY forgot about doing a "View/SQL"
to check and make sure that ............., * FROM wasn't in the code,
and sure enough, it was. So even though it got removed from the design
code, it didn't get removed from the SQL code, which I usually do
check...

Thank you, you were absolutely right, and I apologize!

--- Charles!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top