Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Oct 2004
    Location
    Evansville, Indiana, USA
    Posts
    111
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Progress Bar (2003)

    I have a database that runs this sub procedure as an on click event:
    Sub ChkSubmit()
    'Disable the timesheet if it has been submitted for approval
    Dim strDocName
    strDocName = "frmWeek" & Me.txtCurWk
    Dim submittedyet
    submittedyet = DLookup("Submitted", "tblSubmit", "[Emp#] = " & Chr(34) & _
    [Forms]![frmlogin]![cmbEmpName] & Chr(34) & " And [Week#] = " & [Forms]![frmCalendar]![txtCurWk] _
    & " And [Year] = " & [Forms]![frmCalendar]![txtYear])
    If submittedyet = -1 Then
    DoCmd.OpenForm strDocName, acNormal, , , acFormReadOnly
    Else
    DoCmd.OpenForm strDocName, acNormal, , , acFormAdd
    End If
    End Sub

    Everything works fine, but when it gets to the line docmd.openform strdocName..... it hangs up. I am not sure why. Can someone please give some guidance on how to use a progress bar to let the user know the program is thinking and isn't locked up.
    Thanks

  2. #2
    2 Star Lounger
    Join Date
    Oct 2004
    Location
    Evansville, Indiana, USA
    Posts
    111
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Progress Bar (2003)

    Edited by HansV to provide link to post - see <!help=19>Help 19<!/help>

    I ran the code from <post#=209081>post 209081</post#> and determined that the code take 3.3 sec to run. How to I implement a progress bar to cover this time interval?

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Progress Bar (2003)

    There's not much point in setting up a progress bar for something that takes only 3.3 seconds. If you still want to do so, change the line

    Private Const csngDuration As Single = 5.68

    from <post#=209081>post 209081</post#> to

    Private Const csngDuration As Single = 3.3

Posting Permissions

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