Make Table Query Help

Read Entire Conversation

Delete data from table that was in another one.
Hi, 
 
My problem is this: 
 
I Have two tables... one active products, and another one with active 
 
and non active products (global products). 
 
those tables has a primary key, that is the code of produt. 
 
what i want is to delete from Global Products, all the data that are in 
 
the active products, so that i can create another table with just non 
 
active products. 
 
Any help will be helpfull. 
 
thanx so much.
Read Entire Conversation

Top 10 of each
Right now I have probably over 20 queries to get what I'm looking for, and 
 
I'm convinced theres an easier way of doing it... 
 
I have a table with all the fines all the cars in our company incurs. I want 
 
to use 1 query to get the top ten fine incurring cars between date 1 and date 
 
2 from each center, there are 18 centers. 
 
For example: 
 
If I wanted to do top 2-- 
 
Center 1 has cars 1-5 each incurring fines daily. 
 
Center 2 has cars 6-10, etc as shown in my table 
 
I specify a r ...
Read Entire Conversation

Find Duplicate Records
I'm looking for a way to find duplicate records within a table.  I want to 
 
filter by FirstName & LastName.  I would like the querie to show me the 
 
duplicate records so I can decide which one to keep.  I'm sure the answer is 
 
in here somewhere, but I cant seem to find it.  Any help?
Read Entire Conversation

how can i make a query that is linked from one field in table 1 to
fields in table 2? 
 
The only thing it seems to do is only link the first field in table 2 to the 
 
query rather than all three.
Read Entire Conversation

Update Yes/No on One table depending on Set of Records on another
Hi! I'm really locked up with this. Here's my situation--- 
 
I have two tables tbl1 and tbl2 (one to many) related by the field 
 
"myID". 
 
I have a Yes / No field in each table named Executed on the tbl1 and 
 
Completed on the tbl2. 
 
What i want is " when thru another form 'Form1' i run a update for the 
 
'myID' (i use a text box named 'myID' and a command button named 
 
'Update'), i want to check if  the 'Completed' in tbl2 is true for ALL 
 
Records; if So then update in tbl1 and set  ...
Read Entire Conversation

Combine two tables with a query - How to?
I have two tables, one the working table and the second is an archive 
 
table of older records.  I would like to combine both tables with a 
 
query to do an historical report.  I'm guessing this is easy but I 
 
can't figure it out. ;-( 
 
Any help is greatly appreciated.
Read Entire Conversation

Can't figure out a Query
Hi 
 
I have a table with the following fields 
 
- Month 
 
- CarID 
 
- Reg Plate 
 
- Mileage Band 
 
- Sale Price 
 
And I am trying desperately to achieve something in a query but can't. 
 
The table contains car sales data, as you may have gathered. What I am 
 
trying to do is arrange the query so that car sales in the same month for 
 
the same CarID, same mileage Band and consecutive plates are returned, along 
 
with a calculated field giving the % difference in Price. 
 
The 2 plates  ...
Read Entire Conversation

How to get around the dialogboxes when a delete query is launched
Hi 
 
When I launch a delete query, i always must klikk 3 times yes, yes , yes to 
 
get it done. What shall i do to get none ? 
 
Thanks for all answers !
Read Entire Conversation

Can Access to FULL OUTER JOINS?
Hello all, 
 
In SQL Server, I can do FULL OUTER JOINS where I can return all records from both tables/queries. 
 
It doesn't appear that Access is 
 
capable of doing this.  Can this be done? 
 
TIA, 
 
Conan Kelly
Read Entire Conversation

Combo boxes on query datasheet view
In the Northwind application some of the queries such as Alphabetical product 
 
list has combo boxes appear for some of the fields in datasheet view, and 
 
they also show up if you place the query in a mainform as a subform. How do I 
 
create a datsheet like this.? Can this be done in Access 2000?
Read Entire Conversation

need number in Criteria not enter number
I have a Database that the Criteria has [enter districts] or [enter 
 
districts] or [enter districts].  So every time I type in three numbers I 
 
want. “I have 18 centers and in every center has 3 districts. I have to do 
 
this 18 times.”  I would like to make a Marco, but I do not know how to make 
 
the Criteria, so I do not have to type the three districts in, (example 24, 
 
39, and 41) in one query then move to another query and give me 4, 5 and 20 
 
and etc.  Can you tell me in the ...
Read Entire Conversation

Syntax error (missing operator) in query expression
Hello, 
 
I can't figure out why am I getting above message on this query: 
 
SELECT 
 
dbo_mainCustomer_Florida.customerID,qDRI2.tDRI2,qDRISF.tDRISF,qRRI.tRRI,dbo_mainCustomer_Florida.agencyName,dbo_mainCustomer_Florida.state 
 
,dbo_mainCustomer_Florida.availCredits 
 
FROM dbo_mainCustomer_Florida INNER Join 
 
(SELECT customerID,COUNT(*) tDRI2 FROM dbo_mainCustomer_Florida MC JOIN 
 
dbo_evaluators2_Florida EV ON MC.customerID = EV.Customer_ID JOIN 
 
dri2_Offenders DRI2 ON 
 
EV.password =  ...
Read Entire Conversation

Help with SQL Query - Conditional SHOW
Hi, 
 
I have a complex SQL Query that I am having some trouble with.  I have 
 
2 tables TestTable and Actual Table.  I need to manipulate data from 
 
each table for 2 different time periods.  Using aliases for the tables, 
 
I am able to get the correct values I need for the two time periods. 
 
However, I don't want to show all the results.  The average values are 
 
typically between -50 and 50.  I want only those whose absolute value 
 
is greater than 5 to be displayed.  Is there a way to ...
Read Entire Conversation

Missing Weeks/Months in a Crosstab
Hello all, 
 
I thought I saw something on this recently, but I couldn't find the post and its responses. 
 
I have a crosstab query where the columns are week-end dates, but in my data, there is 3 weeks missing. 
 
So my results go from 
 
3-31-2006 in one column to 4-28-2006 in the next column. 
 
Can I get Access to return empty columns for the 3 missing weeks so there isn't a jump in 3 weeks from one column to the next? 
 
Thanks for any help anyone can provide, 
 
Conan Kelly
Read Entire Conversation

Changing when a day starts and ends
I have a sales report that is setup from a query with a parameter for date - 
 
Between Forms!frmEntry!StartDate and Forms!frmEntry!EndDate.  I have been 
 
asked whether it is possible for the report to have the period as '06:00 Day 
 
1 to 06:00 Day 2'? Currently the client cannot reconcile the billings with 
 
the cash in the till at the end of the evening, because the report is from 
 
midnight to midnight, so it always includes part of the previous day's 
 
trading. 
 
Thanks
Read Entire Conversation

Query Criteria
How do you apply VB generated criteria to a query? Could someone give me the 
 
details on how, in vb, to write a select statement where the criteria 
 
variable can be dropped in and that recordset can then be used for a query. 
 
I need to generate a query prefiltered by date and status, so I can count 
 
the items a person has open. If Bill has ten items, six are open but only 
 
four are in June, if the date and status fields are in the same query I get 
 
results like this: 
 
Bill   6/5/06 ...
Read Entire Conversation

DEFAULT Value in a Query PROMPT (Criteria-type) ??
I've got a query which uses [Enter Date:] in the criteria to prompt the user 
 
for the date. 
 
The date they enter will Usually be the Current date...but not always. 
 
Is there anything that can be added to the prompt that will automatically 
 
insert/enter the current date....displaying it with the prompt...but allowing 
 
the user to enter a different date, when needed? 
 
Something like: 
 
Enter Date: 07/06/2006 
 
- or maybe  - 
 
Enter Date (press Enter for today): 
 
Thanks very much.  ...
Read Entire Conversation

If null then display zero
I have a crosstab query that I need to display zeros if the field is blank. 
 
Here is my SQL statement. Any help is appreciated. 
 
TRANSFORM Count([Arrest table Query 2].[Arrest date?]) AS [CountOfArrest 
 
date?1] 
 
SELECT [Arrest table Query 2].Charges1 
 
FROM [Arrest table Query 2] 
 
GROUP BY [Arrest table Query 2].Charges1 
 
PIVOT [Arrest table Query 2].[Adult or Juvenile] In ("Adult","Juvenile");
Read Entire Conversation

Changing currency criteria with a check box on a form
In my query I have a BallanceDue field.  I want to use a check box on a form 
 
to tell my query to enter a criteria of <>0 in the field. 
 
I have tried the following: 
 
IIf([FORMS]![PrintHCFA].[Greater]=Yes,<>0,"") 
 
This does not work.  I have tried to enter quotes around my parameters and 
 
it still does not work.  I hope you can see my intent.  I think the problem 
 
is my trying to use IIf in a currency field.  Suggestions will be greatly 
 
appreciated.
Read Entire Conversation

I am trying to do a query to find grades a, b or c from a grades t
Do you know what expression I need to use in the criteria cell?
Read Entire Conversation

exclude records
Good afternoon, 
 
I'm trying to exclude results returned by a query.  I have a field  which 
 
has the following values: Released, On hold, Maturity A, Maturity B and 
 
Maturity C. 
 
I wish to exclude all the records where the value = Maturity *.  As such I 
 
added 'Not Like "Maturity*"' as the criteria for this field.  To my amazment, 
 
instead of eliminating these records the query returns only those values. 
 
For fun I removed the "Not" in the criteria and I get the exact same records 
 ...
Read Entire Conversation

Query Active directory and populate access table
I want to be able to query active directory to populate one of the tables in 
 
my access 2000 database. Is this something that can be done from within 
 
access? Or, do I have to write an external program (eg. use .net 
 
DirectoryServices classes) to do this? Can it be done in access 2003? 
 
Thanks in Advance. :) 
 
- Mayank
Read Entire Conversation

Complex formula
Hi. I am working on a query that is pulling from 2 tables. Its WHERE 
 
Statement includes all items where cash in or cash out falls in the following 
 
cases: 
 
1. one large transaction for a single day that is between 3,000 and 9,999 
 
2. multiple smaller transactions in a single day that is between 3,000 and 
 
9,999 
 
Here is what I have so far: 
 
SELECT Day1.ACCOUNT_NUM, [Account Info].NAME, Day1.[CASH-IN], 
 
Day1.[CASH-OUT], Day1.DATE, [Account Info].[Branch Number] 
 
FROM [Account I ...
Read Entire Conversation

Including records
I have a query that pulls back all records that have a >0 value.  It works 
 
fine.  The problem is that I have a few records that contain a 0 value that I 
 
would like to include in my results.  These results include part number, 
 
price and descritions fields.  Maybe I can use the part number to include 
 
those records? How can I achieve both? 
 
Thanks.
Read Entire Conversation