SELECT tblTxAcct.TxAcctName, tblTxType.TxTypeName,
Nz(qryTxAcctListCt.TxCount, 0) AS TxCt
FROM (tblTxAcct INNER JOIN tblTxType ON
tblTxAcct.TxType_ID=tblTxType.TxType_ID) LEFT JOIN qryTxAcctListCt ON
tblTxAcct.TxAcct_ID=qryTxAcctListCt.TxAcct_ID;
I use this query as a RecordSource for a Datasheet that displays Accounts,
Types, and the number of Transactions in each Account. An Account cannot
exist outside of a Type, but an Account does not have to have Transactions
(hence the left join).
The problem is the datasheet is not editable and I need to let users edit
Account names. The Datasheet is editable if I omit the left join and use a
DLookup inside the Datasheet cell to get the TxCount from qryTxAcctListCt -
but that's slow and results in a delay populating the counts when the form
is scrolled.
I'd rather not use a popup form for editing Account names, but I don't know
if it's possible to use the above query for a DataSheet RecordSource and
still have in-cell editing... suggestions?
Thanks in advance. 7 9290
On Fri, 21 Jan 2005 19:44:41 GMT, "deko"
<www.clearpointsystems.com@use_contact_form.com> wrote: SELECT tblTxAcct.TxAcctName, tblTxType.TxTypeName, Nz(qryTxAcctListCt.TxCount, 0) AS TxCt FROM (tblTxAcct INNER JOIN tblTxType ON tblTxAcct.TxType_ID=tblTxType.TxType_ID) LEFT JOIN qryTxAcctListCt ON tblTxAcct.TxAcct_ID=qryTxAcctListCt.TxAcct_ID;
I use this query as a RecordSource for a Datasheet that displays Accounts, Types, and the number of Transactions in each Account. An Account cannot exist outside of a Type, but an Account does not have to have Transactions (hence the left join).
The problem is the datasheet is not editable and I need to let users edit Account names. The Datasheet is editable if I omit the left join and use a DLookup inside the Datasheet cell to get the TxCount from qryTxAcctListCt - but that's slow and results in a delay populating the counts when the form is scrolled.
I'd rather not use a popup form for editing Account names, but I don't know if it's possible to use the above query for a DataSheet RecordSource and still have in-cell editing... suggestions?
Thanks in advance.
The problem is probably not the LEFT JOIN, but that I'm guessing
qryTxAcctListCt is a GROUP BY query. Access won't allow editing of any query
that includes a group by or aggregate subquery anywhere. If you don't have an
aggregate anywhere, I can't see why it wouldn't be editable, but sometimes you
can make a non-editable query editable by useing an inconsistent-updates
dynaset type. Other than that, you're pretty much stuck using something like
DLookup.
You can get around the GROUP BY problem by creating a query to dump the data
into a temp table then linking to that instead of the query.
"Steve Jorgensen" <no****@nospam.nospam> wrote in message
news:de********************************@4ax.com... On Fri, 21 Jan 2005 19:44:41 GMT, "deko" <www.clearpointsystems.com@use_contact_form.com> wrote:
SELECT tblTxAcct.TxAcctName, tblTxType.TxTypeName, Nz(qryTxAcctListCt.TxCount, 0) AS TxCt FROM (tblTxAcct INNER JOIN tblTxType ON tblTxAcct.TxType_ID=tblTxType.TxType_ID) LEFT JOIN qryTxAcctListCt ON tblTxAcct.TxAcct_ID=qryTxAcctListCt.TxAcct_ID;
I use this query as a RecordSource for a Datasheet that displays
Accounts,Types, and the number of Transactions in each Account. An Account
cannotexist outside of a Type, but an Account does not have to have
Transactions(hence the left join).
The problem is the datasheet is not editable and I need to let users edit Account names. The Datasheet is editable if I omit the left join and use
aDLookup inside the Datasheet cell to get the TxCount from
qryTxAcctListCt -but that's slow and results in a delay populating the counts when the
formis scrolled.
I'd rather not use a popup form for editing Account names, but I don't
knowif it's possible to use the above query for a DataSheet RecordSource and still have in-cell editing... suggestions?
Thanks in advance.
The problem is probably not the LEFT JOIN, but that I'm guessing qryTxAcctListCt is a GROUP BY query. Access won't allow editing of any
query that includes a group by or aggregate subquery anywhere. If you don't
have an aggregate anywhere, I can't see why it wouldn't be editable, but sometimes
you can make a non-editable query editable by useing an inconsistent-updates dynaset type. Other than that, you're pretty much stuck using something
like DLookup.
Are the join fields used the primary keys?
I note that those fields are text, and perhaps they are not the primary key?
The join will only be editable if the join is done from a primary key on the
main table, to the field in the child table.
You should also expose the primary key of the child table in the query.
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada pl*****************@msn.com http://www.members.shaw.ca/AlbertKallal
> The problem is probably not the LEFT JOIN, but that I'm guessing qryTxAcctListCt is a GROUP BY query. Access won't allow editing of any
query that includes a group by or aggregate subquery anywhere.
10-4. That's the issue. Here is qryTxAcctListCt:
SELECT COUNT(Tx_ID) AS TxCount, [TxAcct_ID]
FROM tblTxJournal
GROUP BY [TxAcct_ID];
Thanks for the tip.
That "solution" creates its own large set of problems.
On Fri, 21 Jan 2005 16:16:36 -0600, "paii, Ron" <pa**@packairinc.com> wrote: You can get around the GROUP BY problem by creating a query to dump the data into a temp table then linking to that instead of the query.
"Steve Jorgensen" <no****@nospam.nospam> wrote in message news:de********************************@4ax.com.. . On Fri, 21 Jan 2005 19:44:41 GMT, "deko" <www.clearpointsystems.com@use_contact_form.com> wrote:
>SELECT tblTxAcct.TxAcctName, tblTxType.TxTypeName, >Nz(qryTxAcctListCt.TxCount, 0) AS TxCt >FROM (tblTxAcct INNER JOIN tblTxType ON >tblTxAcct.TxType_ID=tblTxType.TxType_ID) LEFT JOIN qryTxAcctListCt ON >tblTxAcct.TxAcct_ID=qryTxAcctListCt.TxAcct_ID; > >I use this query as a RecordSource for a Datasheet that displaysAccounts, >Types, and the number of Transactions in each Account. An Accountcannot >exist outside of a Type, but an Account does not have to haveTransactions >(hence the left join). > >The problem is the datasheet is not editable and I need to let users edit >Account names. The Datasheet is editable if I omit the left join and usea >DLookup inside the Datasheet cell to get the TxCount fromqryTxAcctListCt - >but that's slow and results in a delay populating the counts when theform >is scrolled. > >I'd rather not use a popup form for editing Account names, but I don'tknow >if it's possible to use the above query for a DataSheet RecordSource and >still have in-cell editing... suggestions? > >Thanks in advance. >
The problem is probably not the LEFT JOIN, but that I'm guessing qryTxAcctListCt is a GROUP BY query. Access won't allow editing of any query that includes a group by or aggregate subquery anywhere. If you don't have an aggregate anywhere, I can't see why it wouldn't be editable, but sometimes you can make a non-editable query editable by useing an inconsistent-updates dynaset type. Other than that, you're pretty much stuck using something like DLookup.
> That "solution" creates its own large set of problems.
I ended up using a popup form on double-click of the Datasheet cell, which
is acceptable. The trade-off of in-cell editing for more efficient
populating of the count cell was well worth it. Using DLookup in Datasheet
cells is a hack...
I agree that doing this on a form can cause problems, but can be manageable
if Group BY data is only for reference and users input is check before
saving a record.
"Steve Jorgensen" <no****@nospam.nospam> wrote in message
news:jg********************************@4ax.com... That "solution" creates its own large set of problems.
On Fri, 21 Jan 2005 16:16:36 -0600, "paii, Ron" <pa**@packairinc.com>
wrote:You can get around the GROUP BY problem by creating a query to dump the
datainto a temp table then linking to that instead of the query.
"Steve Jorgensen" <no****@nospam.nospam> wrote in message news:de********************************@4ax.com.. . On Fri, 21 Jan 2005 19:44:41 GMT, "deko" <www.clearpointsystems.com@use_contact_form.com> wrote:
>SELECT tblTxAcct.TxAcctName, tblTxType.TxTypeName, >Nz(qryTxAcctListCt.TxCount, 0) AS TxCt >FROM (tblTxAcct INNER JOIN tblTxType ON >tblTxAcct.TxType_ID=tblTxType.TxType_ID) LEFT JOIN qryTxAcctListCt ON >tblTxAcct.TxAcct_ID=qryTxAcctListCt.TxAcct_ID; > >I use this query as a RecordSource for a Datasheet that displays Accounts, >Types, and the number of Transactions in each Account. An Account cannot >exist outside of a Type, but an Account does not have to have Transactions >(hence the left join). > >The problem is the datasheet is not editable and I need to let users
edit >Account names. The Datasheet is editable if I omit the left join and
usea >DLookup inside the Datasheet cell to get the TxCount from qryTxAcctListCt - >but that's slow and results in a delay populating the counts when the form >is scrolled. > >I'd rather not use a popup form for editing Account names, but I don't know >if it's possible to use the above query for a DataSheet RecordSource
and >still have in-cell editing... suggestions? > >Thanks in advance. >
The problem is probably not the LEFT JOIN, but that I'm guessing qryTxAcctListCt is a GROUP BY query. Access won't allow editing of any query that includes a group by or aggregate subquery anywhere. If you don't have an aggregate anywhere, I can't see why it wouldn't be editable, but
sometimesyou can make a non-editable query editable by useing an
inconsistent-updates dynaset type. Other than that, you're pretty much stuck using
somethinglike DLookup. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: DBNovice |
last post by:
I have a database that keeps records on the issue and failure of an item.
Currently, the database is poorly desisned; therefore I'm performing queries
to break the data into normalized tables and...
|
by: Ed_No_Spam_Please_Weber |
last post by:
Hello All & Thanks in advance for your help!
Background:
1) tblT_Documents is the primary parent transaction table that has 10
fields and about 250,000 rows
2) There are 9 child tables with...
|
by: jimh |
last post by:
I'm not a SQL expert. I want to be able to write a stored procedure
that will return 'people who bought this product also bought this...'.
I have a user table that links to a transaction table...
|
by: d.p. |
last post by:
Hi all,
I'm using MS Access 2003.
Bare with me on this description....here's the situation: Imagine insurance,
and working out premiums for different insured properties. The rates for
calculating...
|
by: Lyn |
last post by:
This one is difficult to explain, so I will cut it down to the basics.
I have a major table 'tblA' which has an autonum field 'ID-A' as primary key
(of no significance to users). 'tblA' contains...
|
by: Fendi Baba |
last post by:
I created a person table with various fields such as Suffix,
Salutation, etc, Some of these fields may not be mandatory for example
suffix. In the actual table itself, I only have a field for...
|
by: schoultzy |
last post by:
Hello Everyone,
This is probably a simple fix so be kind when/if you reply. The query
below retrieves information for individuals based on a column named
ATTRIB_DEF, and assorted other columns;...
|
by: existential.philosophy |
last post by:
This is a new problem for me: I have some queries that open very
slowly in design view.
My benchmark query takes about 20 minutes to open in design view. That
same query takes about 20 minutes...
|
by: bob laughland |
last post by:
Hi All,
I have a SQL query like this (I have tried to break the problem down
to simplify it),
select rowid from table where name in ('a', 'b', 'd') group by rowid
Here is an example of data...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |