Access Projects - Query Designer - Update Queries With Joins Cannot Display In GUI
May 26, 2005
Hi, Big Jim here:
I am really not sure where to ask this one.....
My boss and I are in a jam. We have been using Access to run a reporting process, but one of our tables will exceed the maximum fields allotted this month. Our thought, dump the table into SQL Server and use the GUI interface provided in Access Projects.
Unfortunately, the query designer seems to have a few drawbacks. The one that effects us the most is in using UPDATE queries where more than one table is used to determine records to be updated. In attempting it, we get the message: "The designer does not graphically support the Optional FROM clause SQL construct".
Now I know we can manually create Update Queries, but we often need 1,000+ in a short period of time. Manually punching in all the fields involved and other code just isn't timely.
Question: Is there some alternative, service pack or anything else that would allow us to graphically create these Update Queries using Access Projects or even SQL Server 7.0? I would hate to have to scrap all the work we did over something that seems so minor.
Hi all First off, I hope this post is not inappropriate for this forum!
I'm looking for a designer for access in the Wagga NSW Australia area to help me design a database for our small business.
Some of you may have seen some recent posts by me regarding an invoice database. I was attempting to do this on my own but I now admit defeat. I can't get my head around the basics let alone the difficult stuff so whilst I have made a few DB's myself in the past they were basic, this one is way too complax for my hard head.
I would love to hear from anyone in my area who could help with this on a one on one basis (Hence the need for being close to me)
I am willing to pay for this service & would appreciate if the person understands that I want as much input in the design as possible so I can understand it top to bottom when completed.
Obviously I would like some kind of idea how much this would cost me. Bearing in mind itis tutorial sessions as much as design I am looking for. I would dearly love to be able to do this myself via some TAFE trainning or the like but I simply don't have the time for courses etc as my schedule is very hectic.
Anyways, enough reasons, the gauntlet is down, anyone care to pick it up?
Regards Mik
PS - I would like to thank all those who tried to help this poor wretch but I'm afraid I am a monkey see monkey do kinda guy, much better with one on one.
Hi- I have three queries: Queries: Contain: qryPrimary - primary_code, 1Reasons, EnteredDateCount as "CountP" qrySecondary - 2ndary_code, 2Reasons, primary_ref, EnteredDateCount as "CountS" qryTertiary - tertiary_code, 3Reasons, EnteredDateCount as "CountT", 2ndary_ref
In another query to combine data for a report, I need to see: All the "1Reasons" and "CountP"; their corresponding Secondary "2Reasons", "CountS"; and finally the Tertiary "3Reasons", and "CountT" that correspond to the Secondary's.
Like a fool I thought it would be easy. I know it is probably a join problem, but I can't figure it out.
I am building a select query which is grabbing data from multiple tables with items being linked by a unique field "Certificate_ID".
I have created joins between table A and Table B, and Table A and Table C, linking both by Certificate_ID
All have the join property set to select all Records from table A, but only those from Table B and Table C where the joined fields are equal.
Table A has 5000 records. Am I correct to assume that my query should only return a max of 5000 records as well? When I select Certificate_ID from A and another column from B it only gives me the 5000 unique records. When I add in a column from Table C it is however returning something like 7500 records, with several being duplicates with the same data in every column.
Why it is choosing to duplicate records and give me more than I want. I am sure I am overlooking something simple.
I need to be able to add a feature to an Access project that will select a group of records based on an area code( user will have to be able to select a desired number like 100, or 1000), mark those as selected, and create a single csv file...The area codes are stored in the SQL SERVER database...right now they just export groups of #'s based on area code to excel select the amount they want and cut and paste into a flat file for another application to use...they would like to be able to select a number from a list box or type it in...like 100 ( which means take a 100 #'s from all different area codes) then have them automatically noted in database as being selected..and then export all selections to one csv file... should I do part of the work in the Sql Server behind the scenes..the format of the csv file also needs to be specific in that the first row is the columns separated by commas and then the data follows all text fields enclosed by qoutes.. Thanks for anyone's help ..Im very inexperienced with VB and Access
I have saved query object named qrySearchBill. I wan to call this query through vba and display the result in a subform named subQrySearchBills in datasheet view. Here's how I want it to work:
When the main form loads, I want all unfiltered records to be displayed in the subform initially. The user may then decide to filter based on date range, so he enters startdate and enddate parameter values in their respective textboxes in the main form. Then click search button to run the saved query based on the date range parameter taken from the textboxes.
I have this code so far:
SQL of the saved query object:
Code: PARAMETERS [StartDate] DateTime, [EndDate] DateTime; SELECT tblInvoice.BillNo, tblCrdCustomer.CstName, tblCrdCustomer.CstAddress, tblCrdCustomer.Island, tblInvoice.Date, Sum(tblInvoice.[TotalPrice]) AS Amount FROM tblCrdCustomer INNER JOIN tblInvoice ON tblCrdCustomer.IDNo = tblInvoice.NameID WHERE tblInvoice.Date Between [StartDate] And [EndDate] GROUP BY tblInvoice.BillNo, tblCrdCustomer.CstName, tblCrdCustomer.CstAddress, tblCrdCustomer.Island, tblInvoice.Date;
vba code to call the query and its parameter:
Private Sub btnSearchBill_Click() Dim qdf As DAO.QueryDef Dim rst As DAO.Recordset
Set qdf = CurrentDb.QueryDefs("qrySearchBills")
[Code] ...
This code works fine except that when the main form loads, a prompt window appears to ask for the value of dateStart and dateEnd. I don't want it to prompt because it's suppose to get these values from the main form's textboxes (txtStartDate and txtEndDate respectively), plus it should initially display all the unfiltered records.
I am trying to develop a query in MS Access 2010 to join two tables using three joins one of which is a (between) date range. The tables are contained in Access.
ABCPART links to XYZPART. ABCSERIAL links to XYZSERIAL. ABCDATE links to (between) XYZDATE1 and ZYZDATE2. [ABCTABLE] ABCORDER ABCPART
So I have a table with 2 fields.The first field has the addresses to multiple hyperlink paths to folders on my computer.In this field the display text matches the hyperlink paths.In the second field I have the desired display text for field 1.I have tried using an update query to either:
1) Change the display texts of field 1 to match field 2 while preserving the hyperlink path 2) Add the hyperlink path from field 1 to field 2 without altering the display name.
I cannot get either one to work. Upon updating field 1, I lose the path, and upon updating field 2, I lose the name.
trying to create an update query to Budget table using the Access Design View:
Field: PctSls (in tblBudget) Update to: [Expense] / [Sales]. The update query always returns 0. However, if I create a Select query using the same calculation, the correct results is displayed. PctSls is defined in the Budget table.
I haven't worked with Access (2003) for several years but this seems too simple to be causing me such frustration. (Was only a casual user even then).
I am regularly getting the error "There is not enough free memory to update your display, close unneeded programs and try again"
Access 2013 on a windows 7 machine with 4 processors and 24GB total RAM.
Today I have 14 GB free memory (unbelievable! my first laptop had 136 MB total memory!) when I got this error (Access using 38MB) which makes me believe its not a system memory issue but to do with how much (or quickly) memory is allocated to Access.
From table 1, I join fields A, B, and C to fields A, B, and C on table 2. From Table 2, I join Fields 1 and 2 to Table 3. All the joins are Join 1.
When I pulled (Queried) fields D, E, and F from Table 1, field D from Table 2, and field D from table 3, I have a sum of $1000 under field (column) E from Table 1.
The second time I pulled data, I added fields A and B from table 1 to the query. However, I get a total of $1500 from the same column. i.e Field E from Table 1. I can understand that there will be more rows to provide further data breakdown, but I could not understnad why the total change.
I currently have query that looks at 2 tables that hold financial information. I am querying the data to do some adding and subtracting based off a financial class of a facility. The issue I am having is that one table may have a financial code that the other does not have but I still need to show that financial class for the facility.
My looks as follows
FROM [CashValue Link] INNER JOIN TCashValue ON ([CashValue Link].FINANCIAL = [TCashValue].FINANCIAL) and ([CashValue Link].Date1 = TCashValue.Date1) AND ([CashValue Link].FACILITY = TCashValue.FACILITY) AND ([CashValue Link].CLT = TCashValue.CLT)
Given a table field that is a hyperlink type. I need an Update Query to set all records of that table so that the Displayed Value part of the hyperlink field (not the Address part) is set to a particular value. Any ideas how? Thanks.
Initially the query below used Inner Joins, however that limits my list, when i want to see ALL elements from the MasterTable no matter what, thus my inner joins became left and right joins as follows.
Simple Query: Query1
SELECT MasterTable.Station, MasterStable.Description, MasterTable.Area, AreaTable.Percent, GangTable.GangID, GangTable.Speed FROM (AreaTable RIGHT JOIN MasterTable ON AreaTable.AreaID = MasterTable.Area_ID) LEFT JOIN GangTable ON AreaTable.AreaID = GangTable.Area_ID;
This should simply display All Records in MasterTable, (Multiple Times if Necessary) listing all the elements of AreaTable that are Linked to the MasterTable, and all elements from GangTable that are linked to AreaTable. It does this, and displays them nicely. But I can't edit the fields. I get the result:
1 | Station One | Area 1 | 45% | 204 | 1000 1 | Station One | Area 1 | 45% | 304 | 500 1 | Station One | Area 1 | 45% | 404 | 750 2 | Station Two | Area 1 | 45% | 204 | 1000 2 | Station Two | Area 1 | 45% | 304 | 500 2 | Station Two | Area 1 | 45% | 404 | 750 3 | Station Three | Area 2 | 75% | 254 | 800 3 | Station Three | Area 2 | 75% | 354 | 600 3 | Station Three | Area 2 | 75% | 454 | 700
So you can see that Area 1 has multiple Gangs (204,304,404) and Multiple Stations (1,2). If you do a simple set up like this, you'll find that you can't change the Description field (Rename "Station One" to "Hello World"). It just doesn't work, no matter which way I've tried, I can't seem to make a Query that presents all the information from MasterTable and All the Information IN AreaTable and All the Information in GangTable which will allow me to also edit the fields.
Any Help would be most appreciative, I'm tearing my hair out on this one. Thanks, Jaeden "Sifo Dyas" al'Raec Ruiner
ps - It just seems that with Junction Tables and all the many to many relationship designs I have tried, you'd be able to change the non-related fields. I understand that you can't change the "ID" fields, but the others should be editable.
I have 2 forms which allow the user to first select a catergory. They can then select a sub category based on the selection made in the first box.
I have the form working 90% but can't get the list to filter based on the previous selections.
The code I'm using to generate the listbox rowsource is shown below;
"SELECT tblcatctry.CtryID, tblcatctry.Country, tblcatvtry.zoneID " & _ "FROM tblcontactsCountry RIGHT OUTER JOIN " & _ "tblcatctry ON " & _ "tblcontactsCountry.CtryID = tblcatctry.CtryID " & _ "WHERE (tblcontactsCountry.CompanyID IS NULL) OR " & _ "(tblcontactsCountry.CompanyID <> " & VarCompanyID & ") " & _ "GROUP BY tblcatctry.CtryID, tblcatctry.Country " & _ "ORDER BY tblcatctry.Country"
I want to be able to add in a join to the table tblcontactszone which has the selections previously made for the fields, ZoneID and CompanyID. How do I filter the above further?
I have a simple query linking two tables using the primary keys from each. The problem is that every time I go into design mode of the form that uses the query to populate a list box I get a Data Type Mismatch error and when I look at the query, Access has changed the join from the Pk in one table to the field after the PK in the other field. I have attached an image to show the change. Note that the join should be from the first fields on each table. I am really stuck with this guys, it is gettin me down and preventing me from developing the database further and my boss is on my case. Can anyone please help me? I have checked all the table relationships and they are fine. Thank you.
I have two queries, both delete from the same table and both have joins..This one works:
Code: DELETE RequestCheck.* FROM( SELECT TOP 3 PayRequest.RequestID, PayRequest.GBPAmount, PayRequest.Currency, PayRequest.RequestDate FROM PayRequest WHERE (((PayRequest.Currency)="EUR Euro") AND ((PayRequest.RequestDate)>#11/16/2014#)) ORDER BY PayRequest.GBPAmount ) AS TOP3 INNER JOIN RequestCheck ON TOP3.RequestID = RequestCheck.RequestID WHERE (((RequestCheck.CheckID)=8));
This one does not:
Code: DELETE RequestCheck.* FROM 300_tblDeleteRequestCheck INNER JOIN RequestCheck ON [300_tblDeleteRequestCheck].RCID = RequestCheck.RCID;
I know there are numerous threads regarding dsum() on the forum, but I wasn't able to find the exact answer to my problem.
The root of my problem is that I'm trying to update a field on a table using dsum, which references another query to update the table. Although I have all of the correct keys from the physical table joined to the query in the dsum function, the code/ms access seems to ignore the joins. As a result, all payees are having their "vol" field set instead of a select subset.
Query (GetTxnVolAmtTR"):
SELECT p.payee_id, sum(txn_volume) AS vol, t.market, t.period_id FROM ft_payees AS p, ft_txn_summary AS t WHERE p.payee_id=t.payee_id And p.market=t.market GROUP BY t.payee_id, t.period_id, t.market, p.payee_id;
Update statement (references the query above):
UPDATE tmp_ft_component AS rc SET rc.volume = Dsum("vol","GetTxnVolAmtTR","GetTxnVolAmtTR.payee_id= " & [rc.payee_id] And "GetTxnVolAmtTR.market= " & [rc.market] And "GetTxnVolAmtTR.period_id= " & [rc.period_id] & "") WHERE rc.component_name='Total Revenue';
as you can see, I have all of the fields I want joined, but the code seems to ignore this. I've tried looking at this site: http://www.mvps.org/access/general/gen0018.htm , but haven't found my answer. Any help would be much appreciated!
I am trying to execute the SQL below (tested in other programs, works fine) but access is giving me the "join expression not supported" error. How can this query be used in MS Access? I have tried breaking some of the joins clauses into separate queries, but I can't get it to work and it is making things much more complicated. Also note that moving the join conditions to the where clause could impact performance (this is a very large DB) Could I execute this via code somehow? Thanks.
SELECT lp.loan_id, lp.days_delinquent, lp.current_balance, pc.product_name FROM mtgwl.loan_payment lp inner join mtgwl.deal_loan_relation dlr on lp.loan_id=dlr.loan_id and lp.time_out='9999-12-31-23.59.59.0' and lp.as_of_date='2006-04-30' and dlr.time_out='9999-12-31-23.59.59.0' and dlr.type='DEAL'
inner join mtgwl.deal_loan_relation pdr on dlr.deal_id=pdr.loan_id and pdr.time_out='9999-12-31-23.59.59.0' and pdr.type='PRODUCT'
inner join mtgwl.product_control pc on pc.product_id=pdr.deal_id and pc.time_out='9999-12-31-23.59.59.0' and pc.product_name='GSAMP 2003 AHL'
I am trying to execute the SQL below (tested in other programs, works fine) but access is giving me the "join expression not supported" error. How can this query be used in MS Access? I have tried breaking some of the joins clauses into separate queries, but I can't get it to work and it is making things much more complicated. Also note that moving the join conditions to the where clause could impact performance (this is a very large DB) Could I execute this via code somehow? Thanks.
SELECT lp.loan_id, lp.days_delinquent, lp.current_balance, pc.product_name FROM mtgwl.loan_payment lp inner join mtgwl.deal_loan_relation dlr on lp.loan_id=dlr.loan_id and lp.time_out='9999-12-31-23.59.59.0' and lp.as_of_date='2006-04-30' and dlr.time_out='9999-12-31-23.59.59.0' and dlr.type='DEAL'
inner join mtgwl.deal_loan_relation pdr on dlr.deal_id=pdr.loan_id and pdr.time_out='9999-12-31-23.59.59.0' and pdr.type='PRODUCT'
inner join mtgwl.product_control pc on pc.product_id=pdr.deal_id and pc.time_out='9999-12-31-23.59.59.0' and pc.product_name='GSAMP 2003 AHL'
Simple problem, but my access and sql skills are very limited.
I have two tables. One containing a group of frequent customers with a column called 'member status'. Another table containing a group of non-customers. The addresses in both tables have been matched using group1 software.
I would like to create a query that shows me all the customers with 'member status' = 'A' and all the non-customers who live at the same address.
When i run the query, everybody comes up as 'member status'=A. I think this is because there is no 'member status' field in the non-customers table, and i have failed to make the appropriate join or parameters. Is there a way to design a query that will show 'member status' for those who have it, and will display a null for those who do not?