-
Apr 9th, 2014, 06:17 AM
#1
Thread Starter
Fanatic Member
StatusBar
Hi
I am looping through records , i want at run-time in 2 panels of StatusBar it should show Total No Of Records in one Panel & in Second Panel the record no of record which is being processed
Thanks
-
Apr 9th, 2014, 07:01 AM
#2
-
Apr 9th, 2014, 07:10 AM
#3
Re: StatusBar
Here's a very simple example of setting the text of the two panels using a TIMER.....this is not what you WANT, but it does show you what you need to know. Simply add similar code in your loop as you go through your records in your recordset returned from your DB query.
Code:
Private Sub Timer1_Timer()
Static numRecord As Integer, totRecords As Integer
totRecords = 25
numRecord = numRecord + 1
If numRecord < totRecords + 1 Then
StatusBar1.Panels(1).Text = CStr(totRecords)
StatusBar1.Panels(2).Text = CStr(numRecord)
End If
End Sub
EDIT....if you have difficulty doing it, let me know...I can post faux code for you to follow line by line....but would rather you try it first...relatively easy to do. Your totRecords would be your recset!RecordCount and your numRecord would be the value of a variable you set to zero initially, and increase by 1 for each loop of your recordset.
Last edited by SamOscarBrown; Apr 9th, 2014 at 07:20 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|