A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Query to solve if...



 
 
Thread Tools Display Modes
  #1  
Old February 18th, 2006, 06:42 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Query to solve if...

I have two tables. I want to check if the Computer -table's User ID exicts
in User table. Probably very simple..., but so am I..

-elli-


  #2  
Old February 18th, 2006, 08:09 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Query to solve if...


I've been doing a new database from a huge and messy 1-2-3 with multiple
entries with some smalla differencies. While cleaning the table, I might
have left some of the Computers with a user ID that doesn't exist in User
table anymore, because I 'cleant' it. I mean there where same
User name with many ID-numbers, and I changed in the computer table them to
be the same and deleted the 'overcomes' from the User table. Just need to
check that there aren't any computers without an existing user.

Sorry my messy explanation....

-elli-



"Ken Snell (MVP)" kirjoitti
...
How do you want to use this value? Where are you wanting to look it up?
That will help us help you to use the appropriate approach.

"elli" wrote in message
...
I have two tables. I want to check if the Computer -table's User ID
exicts in User table. Probably very simple..., but so am I..

-elli-

--

Ken Snell
MS ACCESS MVP




  #3  
Old February 18th, 2006, 08:11 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Query to solve if...

I forgot to mention that I don't need it it more than once. And can do the
fix manually, just need to now those ComputerID's without a proper User..

-e-


  #4  
Old February 18th, 2006, 09:27 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Query to solve if...

Hi there! Thank You for your answer... I know Access can do almost anything
one can desire, but I have a problem not knowing it's potentials and
functions.

I know the query wizard, and done queries with it, but to accomplish this
problem I am lost.

But thank You for your help.

-elli-


"Ken Snell (MVP)" kirjoitti
. ..
OK .... in ACCESS, there is a query wizard that will create a query for
you to find "unmatched" records. That is the easiest way to do what you
seek. Try it, and post back with additional questions.

--

Ken Snell
MS ACCESS MVP

"elli" wrote in message
...

I've been doing a new database from a huge and messy 1-2-3 with multiple
entries with some smalla differencies. While cleaning the table, I might
have left some of the Computers with a user ID that doesn't exist in User
table anymore, because I 'cleant' it. I mean there where same
User name with many ID-numbers, and I changed in the computer table them
to be the same and deleted the 'overcomes' from the User table. Just need
to check that there aren't any computers without an existing user.

Sorry my messy explanation....

-elli-



"Ken Snell (MVP)" kirjoitti
...
How do you want to use this value? Where are you wanting to look it up?
That will help us help you to use the appropriate approach.

"elli" wrote in message
...
I have two tables. I want to check if the Computer -table's User ID
exicts in User table. Probably very simple..., but so am I..

-elli-

--

Ken Snell
MS ACCESS MVP








  #5  
Old February 18th, 2006, 09:55 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Query to solve if...



Thank You Ken very much for your help. The SQL did it, and I could fix two
pieces of info) U made my day!

Take care
-e-



"Ken Snell (MVP)" kirjoitti
...
What is confusing you in the wizard? It should lead you through each step
fairly easily. You tell it that you want the Computers table to be the
results for the query, then you tell it you want the Users table as the
one that contains the related records, then you select the fields in both
tables that would be related/linked (UserID?), then you specify the fields
from Computers table that you want the query to show you, and then you are
done.

Otherwise, assuming that the names I've listed above are correct, this is
the SQL statement of the query to show all Computer records containing a
UserID that does not exist in the Users table:

SELECT Computers.*
FROM Computers
LEFT JOIN Users
ON Computers.UserID = Users.UserID
WHERE Users.UserID Is Null;
--

Ken Snell
MS ACCESS MVP



"elli" wrote in message
...
Hi there! Thank You for your answer... I know Access can do almost
anything one can desire, but I have a problem not knowing it's
potentials and functions.

I know the query wizard, and done queries with it, but to accomplish
this problem I am lost.

But thank You for your help.

-elli-


"Ken Snell (MVP)" kirjoitti
. ..
OK .... in ACCESS, there is a query wizard that will create a query for
you to find "unmatched" records. That is the easiest way to do what you
seek. Try it, and post back with additional questions.

--

Ken Snell
MS ACCESS MVP

"elli" wrote in message
...

I've been doing a new database from a huge and messy 1-2-3 with
multiple entries with some smalla differencies. While cleaning the
table, I might have left some of the Computers with a user ID that
doesn't exist in User table anymore, because I 'cleant' it. I mean
there where same
User name with many ID-numbers, and I changed in the computer table
them to be the same and deleted the 'overcomes' from the User table.
Just need to check that there aren't any computers without an existing
user.

Sorry my messy explanation....

-elli-



"Ken Snell (MVP)" kirjoitti
...
How do you want to use this value? Where are you wanting to look it
up? That will help us help you to use the appropriate approach.

"elli" wrote in message
...
I have two tables. I want to check if the Computer -table's User ID
exicts in User table. Probably very simple..., but so am I..

-elli-

--

Ken Snell
MS ACCESS MVP












 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cross tab query construction with Subqueries Steven Cheng Running & Setting Up Queries 7 February 13th, 2006 06:52 PM
Access shuts down, when i try to save this query Dann Running & Setting Up Queries 12 February 3rd, 2006 02:49 AM
AHHHH-Get Data from Multiple Excel workbooks JAA149 General Discussion 5 October 30th, 2005 05:19 PM
Crosstab Query Help Becks New Users 17 October 11th, 2005 08:31 PM
Toolbars, Drop-Down Menus Rick New Users 1 September 21st, 2005 11:17 AM


All times are GMT +1. The time now is 10:34 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.