RelationShips Queries and joins

Not sure where to start and the posts I have read I do not fully understand

I created 2 tables (remitt and Billing) and for each table I created a 
query--Because I needed to create a commmon expression (1st 10 digits of a 
name & a w/e date & Pay code). The names never match 100% 

I want to make a final query and bring over the Billing info into the remitt 
and create a final query

Can I do this?


0
Utf
5/11/2010 10:01:01 PM
access.queries 6343 articles. 1 followers. Follow

10 Replies
991 Views

Similar Articles

[PageSpeed] 3

Post the SQL of the two queries you have now by opening in design view, click 
on VIEW - SQL View, highlight all in the window that opens, copy, and paste 
in a post.

-- 
Build a little, test a little.


"Merge" wrote:

> Not sure where to start and the posts I have read I do not fully understand
> 
> I created 2 tables (remitt and Billing) and for each table I created a 
> query--Because I needed to create a commmon expression (1st 10 digits of a 
> name & a w/e date & Pay code). The names never match 100% 
> 
> I want to make a final query and bring over the Billing info into the remitt 
> and create a final query
> 
> Can I do this?
> 
> 
0
Utf
5/11/2010 11:22:01 PM
On Tue, 11 May 2010 15:01:01 -0700, Merge <Merge@discussions.microsoft.com>
wrote:

>Not sure where to start and the posts I have read I do not fully understand
>
>I created 2 tables (remitt and Billing) and for each table I created a 
>query--Because I needed to create a commmon expression (1st 10 digits of a 
>name & a w/e date & Pay code). The names never match 100% 
>
>I want to make a final query and bring over the Billing info into the remitt 
>and create a final query
>
>Can I do this?
>

Only if you can uniquely identify the records in both tables. Why do you feel
that you need to concatenate? What are these names - people's names? If so,
you can't be sure that they're unique OR that they'll be entered consistantly.

Could you post an example of the data and what you're trying to use for
joining?
-- 

             John W. Vinson [MVP]
0
John
5/12/2010 12:24:42 AM
SELECT [IQN Remitt].[Invoice Number], Left([Current Contractor Full Name],10) 
& [Date - Week Ending Date] & IIf([Hours - Regular Hours Worked]<>0,"Regular 
Hours",IIf([Hours - Overtime Hours Worked]<>0,"Overtime 1","DT")) AS [Name WE 
Pay Code], Left([Current Contractor Full Name],10) & [Date - Week Ending 
Date] AS [Name WE], [IQN Remitt].[Current Contractor Full Name], [IQN 
Remitt].[Hours - Regular Hours Worked], [IQN Remitt].[Hours - Overtime Hours 
Worked], [IQN Remitt].[Hours - Double Time Hours Worked], [IQN Remitt].[Rate 
- Reimbursement Rate], [IQN Remitt].[Rate - OT Reimbursement Rate], [IQN 
Remitt].[Rate - DT Reimbursement Rate], [IQN Remitt].[Expected Reimbursement 
Amount], [IQN Remitt].[Supplier Check #], [IQN Remitt].[Date - Week Ending 
Date], [IQN Remitt].[Date - Supplier Check Date]
FROM [IQN Remitt];


SELECT Left([Employee],10) & [Week End] & [PayCode] AS [Name  WE and Pay 
Code], Left([Employee],10) & [Week End] AS [Name and WE], 
TRU_Billing.Employee, TRU_Billing.Field2, TRU_Billing.[RMX ID], 
TRU_Billing.[SS ID], TRU_Billing.[Client Name], TRU_Billing.[Inv #], 
TRU_Billing.Date, TRU_Billing.[Week End], TRU_Billing.PayCode, 
TRU_Billing.[Line Desc], TRU_Billing.units, TRU_Billing.Rate, 
TRU_Billing.[Line $], TRU_Billing.Discount, TRU_Billing.[Sales Tax], 
TRU_Billing.Net
FROM TRU_Billing, [IQN Remitt Query];


"KARL DEWEY" wrote:

> Post the SQL of the two queries you have now by opening in design view, click 
> on VIEW - SQL View, highlight all in the window that opens, copy, and paste 
> in a post.
> 
> -- 
> Build a little, test a little.
> 
> 
> "Merge" wrote:
> 
> > Not sure where to start and the posts I have read I do not fully understand
> > 
> > I created 2 tables (remitt and Billing) and for each table I created a 
> > query--Because I needed to create a commmon expression (1st 10 digits of a 
> > name & a w/e date & Pay code). The names never match 100% 
> > 
> > I want to make a final query and bring over the Billing info into the remitt 
> > and create a final query
> > 
> > Can I do this?
> > 
> > 
0
Utf
5/12/2010 1:57:01 AM
the 3 combination will create a unique record. Do I need to do this 
differnetly? I am taking the name and using the 1st 10 digits to make it 
match better. 

"John W. Vinson" wrote:

> On Tue, 11 May 2010 15:01:01 -0700, Merge <Merge@discussions.microsoft.com>
> wrote:
> 
> >Not sure where to start and the posts I have read I do not fully understand
> >
> >I created 2 tables (remitt and Billing) and for each table I created a 
> >query--Because I needed to create a commmon expression (1st 10 digits of a 
> >name & a w/e date & Pay code). The names never match 100% 
> >
> >I want to make a final query and bring over the Billing info into the remitt 
> >and create a final query
> >
> >Can I do this?
> >
> 
> Only if you can uniquely identify the records in both tables. Why do you feel
> that you need to concatenate? What are these names - people's names? If so,
> you can't be sure that they're unique OR that they'll be entered consistantly.
> 
> Could you post an example of the data and what you're trying to use for
> joining?
> -- 
> 
>              John W. Vinson [MVP]
> .
> 
0
Utf
5/12/2010 2:08:11 AM
You have a 'spreadsheet' and not a very good one instead of a 'normalized' 
relational database tables.

With text data fields like [Date - Week Ending Date] and [Date - Supplier 
Check Date] you will never be able to sort the records.  You will not be able 
to pull records for any given period of time.

You need to revise your table structure.

-- 
Build a little, test a little.


"Merge" wrote:

> SELECT [IQN Remitt].[Invoice Number], Left([Current Contractor Full Name],10) 
> & [Date - Week Ending Date] & IIf([Hours - Regular Hours Worked]<>0,"Regular 
> Hours",IIf([Hours - Overtime Hours Worked]<>0,"Overtime 1","DT")) AS [Name WE 
> Pay Code], Left([Current Contractor Full Name],10) & [Date - Week Ending 
> Date] AS [Name WE], [IQN Remitt].[Current Contractor Full Name], [IQN 
> Remitt].[Hours - Regular Hours Worked], [IQN Remitt].[Hours - Overtime Hours 
> Worked], [IQN Remitt].[Hours - Double Time Hours Worked], [IQN Remitt].[Rate 
> - Reimbursement Rate], [IQN Remitt].[Rate - OT Reimbursement Rate], [IQN 
> Remitt].[Rate - DT Reimbursement Rate], [IQN Remitt].[Expected Reimbursement 
> Amount], [IQN Remitt].[Supplier Check #], [IQN Remitt].[Date - Week Ending 
> Date], [IQN Remitt].[Date - Supplier Check Date]
> FROM [IQN Remitt];
> 
> 
> SELECT Left([Employee],10) & [Week End] & [PayCode] AS [Name  WE and Pay 
> Code], Left([Employee],10) & [Week End] AS [Name and WE], 
> TRU_Billing.Employee, TRU_Billing.Field2, TRU_Billing.[RMX ID], 
> TRU_Billing.[SS ID], TRU_Billing.[Client Name], TRU_Billing.[Inv #], 
> TRU_Billing.Date, TRU_Billing.[Week End], TRU_Billing.PayCode, 
> TRU_Billing.[Line Desc], TRU_Billing.units, TRU_Billing.Rate, 
> TRU_Billing.[Line $], TRU_Billing.Discount, TRU_Billing.[Sales Tax], 
> TRU_Billing.Net
> FROM TRU_Billing, [IQN Remitt Query];
> 
> 
> "KARL DEWEY" wrote:
> 
> > Post the SQL of the two queries you have now by opening in design view, click 
> > on VIEW - SQL View, highlight all in the window that opens, copy, and paste 
> > in a post.
> > 
> > -- 
> > Build a little, test a little.
> > 
> > 
> > "Merge" wrote:
> > 
> > > Not sure where to start and the posts I have read I do not fully understand
> > > 
> > > I created 2 tables (remitt and Billing) and for each table I created a 
> > > query--Because I needed to create a commmon expression (1st 10 digits of a 
> > > name & a w/e date & Pay code). The names never match 100% 
> > > 
> > > I want to make a final query and bring over the Billing info into the remitt 
> > > and create a final query
> > > 
> > > Can I do this?
> > > 
> > > 
0
Utf
5/12/2010 5:05:01 AM
On Tue, 11 May 2010 19:08:11 -0700, Merge <Merge@discussions.microsoft.com>
wrote:

>the 3 combination will create a unique record. Do I need to do this 
>differnetly? I am taking the name and using the 1st 10 digits to make it 
>match better. 

Names don't have digits (well, R2D2 does), they have characters; and using the
first 10 characters of a 21 character name will make it LESS unique, not more
unique. And if these are people's names, truncating "Bill Jones" and "William
Jones" won't help make them match!

You do NOT need to create a new concatenated field to match records. You can
join two tables on one field, or on three fields, or on ten fields if you
wish.

Again: could you post an example (obfuscated for privacy if need be) of your
data, and explain what constitutes a match? Do you have a Primary Key in both
tables? If so what is that key?
-- 

             John W. Vinson [MVP]
0
John
5/12/2010 5:19:49 AM
Thanks that is true

I will fix up the column names, I just imported the data from a report I ran.

"KARL DEWEY" wrote:

> You have a 'spreadsheet' and not a very good one instead of a 'normalized' 
> relational database tables.
> 
> With text data fields like [Date - Week Ending Date] and [Date - Supplier 
> Check Date] you will never be able to sort the records.  You will not be able 
> to pull records for any given period of time.
> 
> You need to revise your table structure.
> 
> -- 
> Build a little, test a little.
> 
> 
> "Merge" wrote:
> 
> > SELECT [IQN Remitt].[Invoice Number], Left([Current Contractor Full Name],10) 
> > & [Date - Week Ending Date] & IIf([Hours - Regular Hours Worked]<>0,"Regular 
> > Hours",IIf([Hours - Overtime Hours Worked]<>0,"Overtime 1","DT")) AS [Name WE 
> > Pay Code], Left([Current Contractor Full Name],10) & [Date - Week Ending 
> > Date] AS [Name WE], [IQN Remitt].[Current Contractor Full Name], [IQN 
> > Remitt].[Hours - Regular Hours Worked], [IQN Remitt].[Hours - Overtime Hours 
> > Worked], [IQN Remitt].[Hours - Double Time Hours Worked], [IQN Remitt].[Rate 
> > - Reimbursement Rate], [IQN Remitt].[Rate - OT Reimbursement Rate], [IQN 
> > Remitt].[Rate - DT Reimbursement Rate], [IQN Remitt].[Expected Reimbursement 
> > Amount], [IQN Remitt].[Supplier Check #], [IQN Remitt].[Date - Week Ending 
> > Date], [IQN Remitt].[Date - Supplier Check Date]
> > FROM [IQN Remitt];
> > 
> > 
> > SELECT Left([Employee],10) & [Week End] & [PayCode] AS [Name  WE and Pay 
> > Code], Left([Employee],10) & [Week End] AS [Name and WE], 
> > TRU_Billing.Employee, TRU_Billing.Field2, TRU_Billing.[RMX ID], 
> > TRU_Billing.[SS ID], TRU_Billing.[Client Name], TRU_Billing.[Inv #], 
> > TRU_Billing.Date, TRU_Billing.[Week End], TRU_Billing.PayCode, 
> > TRU_Billing.[Line Desc], TRU_Billing.units, TRU_Billing.Rate, 
> > TRU_Billing.[Line $], TRU_Billing.Discount, TRU_Billing.[Sales Tax], 
> > TRU_Billing.Net
> > FROM TRU_Billing, [IQN Remitt Query];
> > 
> > 
> > "KARL DEWEY" wrote:
> > 
> > > Post the SQL of the two queries you have now by opening in design view, click 
> > > on VIEW - SQL View, highlight all in the window that opens, copy, and paste 
> > > in a post.
> > > 
> > > -- 
> > > Build a little, test a little.
> > > 
> > > 
> > > "Merge" wrote:
> > > 
> > > > Not sure where to start and the posts I have read I do not fully understand
> > > > 
> > > > I created 2 tables (remitt and Billing) and for each table I created a 
> > > > query--Because I needed to create a commmon expression (1st 10 digits of a 
> > > > name & a w/e date & Pay code). The names never match 100% 
> > > > 
> > > > I want to make a final query and bring over the Billing info into the remitt 
> > > > and create a final query
> > > > 
> > > > Can I do this?
> > > > 
> > > > 
0
Utf
5/12/2010 9:28:01 AM
My problem is the data format is different on both reports
Doing this concatenate The pay code on one reports references the pay code 
and on the other report you have to figure out the code by what type of hours 
they have worked. then for the nameJohnson Dominick is on one and Johnson 
Dominick Jr is on another this is why I take the first 10 digits

I want to keep it simple I may just export the query to excel and import it 
back as a table. I do not have much support from my IT group so I am tackling 
this on my own (Novice user) 

I am just using this to match Data to create coding for payments received.

"John W. Vinson" wrote:

> On Tue, 11 May 2010 19:08:11 -0700, Merge <Merge@discussions.microsoft.com>
> wrote:
> 
> >the 3 combination will create a unique record. Do I need to do this 
> >differnetly? I am taking the name and using the 1st 10 digits to make it 
> >match better. 
> 
> Names don't have digits (well, R2D2 does), they have characters; and using the
> first 10 characters of a 21 character name will make it LESS unique, not more
> unique. And if these are people's names, truncating "Bill Jones" and "William
> Jones" won't help make them match!
> 
> You do NOT need to create a new concatenated field to match records. You can
> join two tables on one field, or on three fields, or on ten fields if you
> wish.
> 
> Again: could you post an example (obfuscated for privacy if need be) of your
> data, and explain what constitutes a match? Do you have a Primary Key in both
> tables? If so what is that key?
> -- 
> 
>              John W. Vinson [MVP]
> .
> 
0
Utf
5/12/2010 10:55:01 AM
One way would be to build a translation table like this --
tblTranslate --
EmpID - Primary key
IQN Remitt - text - names used in the table
TRU_Billing - text - names used in the table

Then you can join the tables using tblTranslate table.

-- 
Build a little, test a little.


"Merge" wrote:

> My problem is the data format is different on both reports
> Doing this concatenate The pay code on one reports references the pay code 
> and on the other report you have to figure out the code by what type of hours 
> they have worked. then for the nameJohnson Dominick is on one and Johnson 
> Dominick Jr is on another this is why I take the first 10 digits
> 
> I want to keep it simple I may just export the query to excel and import it 
> back as a table. I do not have much support from my IT group so I am tackling 
> this on my own (Novice user) 
> 
> I am just using this to match Data to create coding for payments received.
> 
> "John W. Vinson" wrote:
> 
> > On Tue, 11 May 2010 19:08:11 -0700, Merge <Merge@discussions.microsoft.com>
> > wrote:
> > 
> > >the 3 combination will create a unique record. Do I need to do this 
> > >differnetly? I am taking the name and using the 1st 10 digits to make it 
> > >match better. 
> > 
> > Names don't have digits (well, R2D2 does), they have characters; and using the
> > first 10 characters of a 21 character name will make it LESS unique, not more
> > unique. And if these are people's names, truncating "Bill Jones" and "William
> > Jones" won't help make them match!
> > 
> > You do NOT need to create a new concatenated field to match records. You can
> > join two tables on one field, or on three fields, or on ten fields if you
> > wish.
> > 
> > Again: could you post an example (obfuscated for privacy if need be) of your
> > data, and explain what constitutes a match? Do you have a Primary Key in both
> > tables? If so what is that key?
> > -- 
> > 
> >              John W. Vinson [MVP]
> > .
> > 
0
Utf
5/12/2010 3:34:07 PM
On Wed, 12 May 2010 03:55:01 -0700, Merge <Merge@discussions.microsoft.com>
wrote:

>My problem is the data format is different on both reports
>Doing this concatenate The pay code on one reports references the pay code 
>and on the other report you have to figure out the code by what type of hours 
>they have worked. then for the nameJohnson Dominick is on one and Johnson 
>Dominick Jr is on another this is why I take the first 10 digits
>
>I want to keep it simple I may just export the query to excel and import it 
>back as a table. I do not have much support from my IT group so I am tackling 
>this on my own (Novice user) 
>
>I am just using this to match Data to create coding for payments received.

You're unfortunately making it more complicated, not simpler!

Don't confuse data STORAGE with data DISPLAY. You should not - cannot! - let
the desired format of a report drive your table or database structure. YOu
should have a table of People, with a unique PersonID, so that Dominick
Johnson is in a table with a structure like:

PersonID    312
FirstName   "Dominick"
LastName   "Johnson"
Suffix          "Jr."
Nickname    "Dom"


which can be displayed on a report any way you like.

This structure would also allow you to accommodate the case that you might be
dealing with Dom Sr. and Dom Jr., different people doing different things.

You might want to look at some of these resources:

Jeff Conrad's resources page:
http://www.accessmvp.com/JConrad/accessjunkie/resources.html

The Access Web resources page:
http://www.mvps.org/access/resources/index.html

Roger Carlson's tutorials, samples and tips:
http://www.rogersaccesslibrary.com/

A free tutorial written by Crystal:
http://allenbrowne.com/casu-22.html

A video how-to series by Crystal:
http://www.YouTube.com/user/LearnAccessByCrystal

MVP Allen Browne's tutorials:
http://allenbrowne.com/links.html#Tutorials

Crystal's and Allen's tutorials in particular might give you a good
foundation.
-- 

             John W. Vinson [MVP]
0
John
5/12/2010 5:46:34 PM
Reply:

Similar Artilces:

Append Query 02-28-08
I am trying to append data from tblitemline to tblitemlist. I only want to append new records. The unique field is ListID. I want to append 4 fields total. I can't get it to limit it to new records. Any help would be appreciated. Thanks! New on the basis of what criteria.? Whatever that criteria is it should either the primary key (there can be multiples fields involved as the primary key) or Indexed with NO duplicates, (this will work if the criteria is a single field). Once you set the table up that way, the append query will only add "new" records. You can still have a ...

database query/names issue, causing excel to be sluggish
I have an issue with an excel worksheet I've created. WorkbookA has "Names" which are used to define drop-down menus in WorksheetA. These "Names" are defined to reference a WorksheetB (also in WorkbookA) which itself is populated by a database query, pulling from another Excel WorkbookB. The logic is that WorkbookB should not be touched by the User, only an Admin, and Workbook A is used by User. The Names in WorkbookA are to prevent incorrect entries. Now that I've set it up, WorkbookA is moving really sluggish, but if I delete all the Names it speeds up again....

which query is faster, better to use?
There are multiple AdjournmentDates for any given NoticeID in tblNotices_AdjournemntDates. I want the most recent date for each NoticeID. Both of these produce the correct results. Is either one better than the other? SELECT DISTINCT NoticeID, (SELECT TOP 1 AdjournmentDate FROM dbo.tblNotices_AdjournmentDates WHERE NoticeID = A.NoticeID ORDER BY AdjournmentDate DESC) FROM dbo.tblNotices_AdjournmentDates A SELECT NoticeID, AdjournmentDate FROM dbo.tblNotices_AdjournmentDates A WHERE (AdjournmentDate IN (SELECT TOP 1 AdjournmentDate FROM tblNotices_AdjournmentDates WHER...

Load query with outdata until search
I have a form with sub form on it I use this form to search for products we keep in stock with prices, I have a Search text box on the form then i type in the product then hit the search button and it requerys the sub form Only problem i have is when i first load the form it show every product in the subform, so takes a long time to load Is there a way to load the page with out the date then i can type in product i want to search for then it displays the products Simon What about setting the .RecordSource property of that form (?subform) to "" in the OnLoad event,...

Should be able to change parent and child relationships
Within National Accounts we have the need to change what parent the child is associated to. We use National Accounts to keep track of which customers have a certain funding source. Often that association changes and we would like to be able to change that without having to set-up a whole new child. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Micros...

query problem 02-11-08
Hi to Everyone I have a table (tblMunka) with the following columns: JobId; PersonalId;AreaId;StartDate;EndDate;ActiveJob I would like to a query which tell me how many personal was in a term in an area. I have a form (frmLetszam) where user can choose start and end dates from a calendar. I've tried with this but the result is not good: HAVING (((tblMunka.StartDate) Between [Forms]![frmLetszam]![cboEndDate] And [Forms]![frmLetszam]![cboEndDate])) OR (((tblMunka.StartDate)<[Forms]! [frmLetszam]![cboStartDate]) AND ((tblMunka.EndDate) Is Not Null)); Please help me! Best regards -- Mes...

join imported Excel 2007 files
I have two Excel 2007 files that I need to join to form one spreedsheet of data. I have the unique identifier column in both files. There will be some records (rows) that are in one file but not in the other that need to be kept as well. How can I pull all of this data together using the unique identifier column in both files? (82,000 records) Hi, Refer to this article http://datapigtechnologies.com/blog/index.php/using-access-to-combine-multiple-excel-files-method-2/ -- Regards, Ashish Mathur Microsoft Excel MVP www.ashishmathur.com "Dayle" <Dayle@d...

Query with Combo Boxes on a Form
I'm using QBF with about six different combo boxes using: [forms]! [formmain]! [combo1] or [forms]![formmain1]![combo1] -like in a VBA book. This is so users can select criteria on a form with the combo boxes, and when they are done, they hit the search button, and it opens up another form based on the query just performed by the combo selection. This worked for about three combo boxes, but when I added another one, it freezes up and opens up a blank page. It's supposed to open the new form based on the query. Is there a better way to do this? Any help would...

LDAP Query #4
im sorry if this post is in the wrong group how can i create an ldap query to get all the users with exchange boxes inside a specific OU this OU might also have OUs indise it with users that hafve mailboxes i want this to be able to create customized address lists Thank you Address Lists cannot be targeted at particular OUs. You need to use some user attribute that's common for users in that OU - like department, location, company name, etc. -- Bharat Suneja MCSE, MCT www.zenprise.com blog: www.suneja.com/blog ----------------------------------------- "Nazgyl" <naz...

Creating a Report using two queries
I have created a chart report (bar chart) using one query. How can I create another single chart showing the results of both queries. One will show the bars of first query data and the other will show bars of the data from second query together in a single chart report. Any suggestions? -- FL This depends on how/if the two queries are related. I would expect the "X" axis values might be related. If so, join the two queries into a single query and graph the new query. -- Duane Hookom Microsoft Access MVP If I have helped you, please help me by donating to UCP http://www...

Complex Update Query in SQl Server 2000
I need to update ACTINDX in UPR40500 for each JOBTITLE in MYTABLE. We have modified the ACTNUMBR in 'MYTABLE' whose segments are contained in GL00100 GL00100 ACTINDX ACTNUMBR_1 ACTNUMBR_2 ACTNUMBR_3 ACTNUMBR_4 ACTNUMBR_5 30562 222 411001 000000 150 350 30563 222 411001 000000 155 355 UPR40500 JOBTITLE ACTINDX 209401 30562 150001 30563 MYTABLE JOBTITLE ACTNUMBR 209401 222-411001-000000-150-350 150001 222-411001-000000-155-355 Sean: If you are storing the account number as a string in my table, an...

Select Query Broken
Does any one know, of the issue in A2k3 With the Query, I was creating some combo list filters, via query's then putting the SQL in a Marco Apply filter. work great then all i sudden, now, when i view the query in normal mode, (NOT Design mode) Its Showing all the fields that are related on the table the query is based on, even though only two fields have been selected. and the show tick is ticked? just for 2, any ideas whats happening here? ive tried repairing and compacting database and also restarting access no luck? On 10 Sep, 16:42, KARL DEWEY <KARLDE...@discussions.microsoft...

Public folders: query regarding the "synchronize now" function
Exchange 2003 SP2 I have a query regarding the "synchronize now" function for public folders. Say I have a public folder called "Bob" with replicas on 3 servers (ServerA, ServerB, ServerC) If I drill down to Folders/Public Folders Select the "BOB" public folder and select the "Status Tab" on say ServerA, I see all 3 replicas listed as expected: If I right click a replica I can select "synchronize now" what does this do exactly? Does it: 1) Push updates out from the replica where you right click and select "synchronize now" ...

Query Button Problem
On my form, I need to put a button to run a query. When using the toolbox in the Design View, I use the Command Button Toolbar, then use MIscellaneous, then Run Query. I select the correct one, and save it to the form. When I try to use it, I get an error message, and it will not work. What is going wrong? Can't figure it out if you don't provide an error message. On Fri, 1 Feb 2008 10:52:00 -0800, Shari <Shari@discussions.microsoft.com> wrote: >On my form, I need to put a button to run a query. When using the toolbox in >the Design View, I use the Command Button To...

criteria for filtering check boxes in a query
I am trying to do a permanent sort for columns using check boxes. I need to know the formula for the criteria box On Wed, 20 Jun 2007 14:54:41 -0700, Desiree wrote: > I am trying to do a permanent sort for columns using check boxes. I need to > know the formula for the criteria box What is "a permanent sort for columns using check boxes". Perhaps your terminology is clear to you, but I think you would do well to re-think and repost your question. -- Fred Please respond only to this newsgroup. I do not reply to personal e-mail On Thu, 21 Jun 2007 15:38:03 -0700, Desir...

adding fields in query
I am trying to add fields in a query to put into a new field. For example; FieldOne, FieldTwo, and FieldThree should equal FieldFour. FieldOne has a value of 1, FieldTwo has a value of 2 and FieldThree has a value of 3. When I try =FieldOne+FieldTwo+FieldThree in FieldFour with the expression builder, it does not add them, it just shoves all their values together. Instead of FieldFour having a value of 6 when I run the query, it gives me a value of 123. I have also tried the "&" instead of "+", and I get the same results. I have tried changing the To...

stop returning column headings from DB query
I put together a query to go against Oracle that returns a block of data to the spreadsheet. Is there an option somewhere to have the "Return Data to Excel" do so without also returning the column headings? I want the data only. thanks - Russ There are 2 places that you can change that setting..... 1)When you return data from MS Query the dialog where you select the location for the data has a Properties button. Click that button UNcheck: Include Field Names.......click [OK] Continue selecting the query destination OR 2)After the data has been pulled from Oracle Right-click...

Tranform Pivot Query?
I hv 2 tables with structure as below: [Empl] ID Name 1 Mr A 2 Mr B 3 Mr C 4 Mr D 5 Mr E [Empl_Tran] TrID Empl_ID Date Code 1 1 10/11/2009 SL 2 1 10/11/2009 TR 3 1 11/11/2009 W 4 1 12/11/2009 W 5 1 12/11/2009 TR 6 2 10/11/2009 SL 7 2 10/11/2009 TR 8 2 11/11/2009 W 9 2 12/11/2009 W 10 2 12/11/2009 TR 11 3 10/11/2009 SL 12 3 10/11...

Web query again
Hello, I looked on MSDN about web queries with VBA. But the code I took from there doesn't work. Dim BaseURL As String BaseURL = "some URL" Const StartDate As Date = #11/2/2004#, EndDate As Date = #4/20/2005# Dim d As Date For d = StartDate To EndDate Dim newSheet As New Excel.Worksheet Set newSheet = Worksheets.Add With newSheet .Name = Replace(CStr(d), "/", ".") Call .Activate End With 'MsgBox ("URL;" & BaseURL) 'Next line gives an error 'Run-time error '5': 'Invalid ...

emailing query window type result messages
I'm creating some backup procedures. While testing them in the query window, I'll get messages like this: 100 percent processed. Processed 0 pages for database 'Caser', file 'Caser_Log' on file 1. BACKUP LOG successfully processed 0 pages in 0.097 seconds (0.000 MB/sec). The backup set on file 1 is valid. I knonw how to do this: BACKUP LOG [Caser] TO DISK = @BackupLocationAndName WITH NOFORMAT, NOINIT, NAME = @BackupName, SKIP, REWIND, NOUNLOAD, STATS = 10 SET @Err = @@ERROR IF @Err <> 0 BEGIN EXECUTE msdb.dbo.sp_notify_operator @name = ...

data base query
I have a workbook with 2 work sheets. Eacch contains data from a database query( 2 different databases) Is it possible to create a pivot table from the 2 sheets ? ...

Exporting a Query to Excel
Hi, I have a query of Purchase Oders, sorted by month, for a particular business unit and was wondering if there was a way to export the data to one excel workbook, but to have 12 tabs of monthly data instead of having to separate it out manually. thanks -- C. Williamson Here is some code that I wrote for a poster a few months ago that will do this type of export. You'll need to modify the code so that it will loop through a list of months instead of a list of managers. Post back with questions (and with more details) if you have problems. Generic code to create a temporary qu...

SQL Server 2005: SELECT INTO & pass-through query
Hi I often use pass-throgh queries to get data from external sources - something like following example: ---------------------------------------------- Use MyDaytabase -- Declaring variables DECLARE @SQLString varchar(max) DECLARE @OpenQuery varchar(max) DECLARE @LinkedServer varchar(max) -- Declaring table variables DECLARE @Q1 TABLE( id INTEGER, Field1 DATETIME, Field2 VARCHAR(50), Field3 INTEGER) -- Setting variables SET @LinkedServer = 'MyLinkedServer' SET @OpenQuery = 'SELECT * FROM OPENQUERY(' + @LinkedServer +',''' -- Co...

MS "Query", MS Excel not playing nicely
Using Excel 2000 (9.0.2720), Clicking Data, Get External Data, New Database Query. Not working. Says, "Waiting for data to be returned from Microsoft Query" in the status bar, then pops up a dialog that says, "Microsoft Query could not be started because it isn't installed. You can install Query by running the installation programyou used to install Office or Excel. The Query option is in the Office Tools category." But I *DID* install Query!!! If I set MS Query (in Control Panel, Add/Remove Programs, MS Office) to "install on 1st use", then Excel knows it n...

Newbie
Could someone please help me. I have constructed a Database with several Tables that contain Names and Addresses. The Database consists of several Tables each containing 65000 records. What I wish to do is to set up a query so that when I search for a surname the output will list all the matching surnames in all the Tables. I think I need to set up the relationships between the tables but although I have tried the trial and error method I cannot get it to work. Any help appreciated Please reply to group or to ken@nospamgorseport.fsworld.co.uk (remove nospam) Many thanks in advance R...