Re: How to obtain a count of subform records
- From: "dragos" <dragos.coicea@xxxxxxxxx>
- Date: 27 Dec 2006 21:25:56 -0800
Roy wrote:
I have a main form titled "frmProcessTransactions"(the one side). Within that
form, I have an embedded subform titled "qryBRProjectAuthorizations subform".
I need to know how I can get a count of the number of records in the subform
so that I can walk through the subform records to the end without going over
and causing an error.
Can anyone help me? Please.
--
Roy
Another way to do this does not require coding at all.
Put a textbox control in the subform's footer and name this control
txtRecordsCount
Under txtRecordsCount properties ***, enter: =Count([MyId]). MyId is
supposed to be the name of the field used to bind the main form and the
subform each other.
On the main form, put another textbox and enter: =[Forms]![Main
Form]![Subform]![txtRecordsCount] in its controlsource
Is almost the same as John's solution. Keep in mind that one of the
most important things in Access is to use collections of objects.
Almost everything is collection based. If you know that well you should
also know how to reffer to an member of a specific collection from
everywhere.
Dragos
.
- Prev by Date: Re: Error with Open Event in Access 2003 under Vista
- Next by Date: Re: saving information into a tables
- Previous by thread: Re: How to obtain a count of subform records
- Next by thread: Query return nothing
- Index(es):