I have a form with a listbox [list4] and a textbox to show number of record
in the listbox. In the Control Source of textbox, I put the following:
=[List4].[ListCount].
The problem is when I turn Colum Head of the listbox on, the textbox result
always show one record extra.
Is there a way to correct this?
SF
Try =([List4].[ListCount] - 1)
if you want to display the column heads.
Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
"SF" wrote:
> Hi,
>
> I have a form with a listbox [list4] and a textbox to show number of record
> in the listbox. In the Control Source of textbox, I put the following:
> =[List4].[ListCount].
>
> The problem is when I turn Column Head of the listbox on, the textbox result
Explanation:
ColumnHeads is a true/false value.
Access uses -1 for True, and 0 for False.
So the expression adds minus one if column heads is on, or zero if it's off.
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"SF" <x...@yahoo.com> wrote in message
news:%23ioQhx9...@TK2MSFTNGP04.phx.gbl...