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 9078
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: Kemmylinns12 |
last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
|
by: Naresh1 |
last post by:
What is WebLogic Admin Training?
WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
|
by: antdb |
last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine
In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
|
by: WisdomUfot |
last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
|
by: Carina712 |
last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
|
by: BLUEPANDA |
last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
|
by: Ricardo de Mila |
last post by:
Dear people, good afternoon...
I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control.
Than I need to discover what...
|
by: Johno34 |
last post by:
I have this click event on my form. It speaks to a Datasheet Subform
Private Sub Command260_Click()
Dim r As DAO.Recordset
Set r = Form_frmABCD.Form.RecordsetClone
r.MoveFirst
Do
If...
|
by: DizelArs |
last post by:
Hi all)
Faced with a problem, element.click() event doesn't work in Safari browser.
Tried various tricks like emulating touch event through a function:
let clickEvent = new Event('click', {...
| |