Results 1 to 3 of 3

Thread: StatusBar

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2011
    Posts
    688

    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

  2. #2
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,145

    Re: StatusBar

    What have you tried?

  3. #3
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,145

    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
  •  



Click Here to Expand Forum to Full Width