Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2014
    Posts
    4

    Unanswered: How To Code Progress Bar With Compact & Repair

    I have posted two codes "Code Compacts & Repair Database" & "Code is For Progress Bar"

    In Code for Progress Bar "DoCmd.OpenQuery "Query1", acViewNormal" trigger the Query1
    What I want is to replace this somehow with

    Dim control As Office.CommandBarControl
    Set control = CommandBars.FindControl(Id:=2071)
    control.accDoDefaultAction

    This I don't know how to do it, Can someone help me here.







    This Code Compacts & Repair Database


    Private Sub Command463_Click()

    Dim control As Office.CommandBarControl
    Set control = CommandBars.FindControl(Id:=2071)
    control.accDoDefaultAction

    End Sub




    This Code is For Progress Bar


    Private Sub Command98_Click()

    DoCmd.SetWarnings False
    DoCmd.OpenQuery "Query1", acViewNormal
    Me.LBL1.Visible = True
    Me.LBL2.Visible = True
    Me.PROGRESS.Caption = "20%"
    DoEvents
    Me.LBL3.Visible = True
    Me.LBL4.Visible = True
    Me.PROGRESS.Caption = "40%"
    DoEvents
    Me.LBL5.Visible = True
    Me.LBL6.Visible = True
    Me.PROGRESS.Caption = "60%"
    DoEvents
    Me.LBL7.Visible = True
    Me.LBL8.Visible = True
    Me.PROGRESS.Caption = "80%"
    DoEvents
    Me.LBL9.Visible = True
    Me.LBL10.Visible = True
    Me.PROGRESS.Caption = "100%"
    DoEvents
    DoCmd.SetWarnings True

    End Sub

  2. #2
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    495
    Provided Answers: 24
    I dont think you can...the compress happens 'outside' of a db, so you cant see what its doing.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •