msflexgrid row count

Is there a way no matter how I populate an msflexgrid to get the actual row count Excluding Null rows put into a label?
fordraiders
LVL 3
FordraidersAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

FordraidersAuthor Commented:
To All,
I have the following working but is not getting rid of null rows.
lblRecordCount is the Label on the form.


lblRecordCount = MsFlexgrid1.rows -1

The minus one is for the first row header.
fordraiders
0
TimCotteeHead of Software ServicesCommented:
Hi David: how are things?

Short of going through each row and determining whether it has valid data, incrementing a counter if it has there is no easy way of doing this that I can think of.
0
FordraidersAuthor Commented:
Tim,
Things are going well!
Thank You.

The count is for the Populategrids routine.
After the return in Msflexgrid1 from all three databases. I was trying to count the number of non-Null rows in the return.

Other than using the statement Above.
I have yet to get a total accurate count,
Because of null rows.
fordraiders
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

TimCotteeHead of Software ServicesCommented:
David:

The following code will give the number of non-null records in the flexgrid:

iif(rstStorage.RecordCount >0,rstStorage.RecordCount ,0) + iif(rstStorage2.RecordCount >0,rstStorage2.RecordCount ,0) + iif(rstStorage3.RecordCount >0,rstStorage3.RecordCount ,0)

You need to use this immediately before each Exit Function line in the populategrids routine to update the label's caption with the value.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
FordraidersAuthor Commented:
Tim,
This interesting.
I tried.

lblrecordcount = rstStorage.RecordCount + rstStorage2.RecordCount +
rstStorage3.RecordCount

But it didn't work.
Will give it a whirl.

Didn't think about going with the IIF.
Now that I think about it.
I used the IIF quite abit when I Used Access97-vba on another project.

I also added at the beginning of each function.
dim  lblString as string
lblstring = "Records Returned"
lblReturn.Caption =  lblString

Just so I wouldn't have to repeat it at the end of each
Exit Function

Your the best.
Thanks again for the attention.
fordraiders
0
Wilder1626Commented:
but i only look in column 39, so it should only be 114331. Right?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.