ms access - How to use progress bar onclick event -


hello trying display form shows progress of queries performed in onclick event:

private sub command125_click()            '***************statement covers period 104.03***************** dim countofdays integer dim lngred long  lngred = rgb(255, 0, 0)   countofdays = datediff("d", me.admit_date, me.from_date)   if countofdays > 3     me.from_date.forecolor = lngred     me.label126.visible = true     'select lines on contain dos 3 days prior     'to date of admission , enter reason code 104.03      if fileexists("m:\a_audit\client_" & [forms]![frmclients]![client_id] & "\client_" & [forms]![frmclients]![client_id] & ".xlsx")         docmd.setwarnings (false)         docmd.openquery ("qryerrorcode104-03")         docmd.setwarnings (true)      else          msgbox "please upload itemized statement identify more 3 days" & _     "discrepancy between statement date , admission date."      end if  end if   '***************diagnosis code incorrect patients age 104.07***************** dim count integer docmd.setwarnings (false) docmd.openquery ("qryerrorcode104-07 -1") count = dcount("*", "qryerrorcode104-07 -2") if count > 0 me.label123.visible = true end if docmd.deleteobject actable, "tmp10407" docmd.setwarnings (true)    '***************diagnosis code incorrect patients sex 104.08*****************  docmd.setwarnings (false) docmd.openquery ("qryerrorcode104-08 -1") count = dcount("*", "qryerrorcode104-08 -2") if count > 0 me.label124.visible = true end if docmd.deleteobject actable, "tmp10408" docmd.setwarnings (true)  end sub 

i have tried using activexcontrol microsoft progressbar control, version 6.0 no luck. when click button run code progressbar doesnt move. appreciated. thank in advance.

i don't see way judge progress other defining in quarters each step. if add active x progressbar , call progressbar1 such update it

private sub command125_click()  me.progressbar1.value = 25 'we @ first leg set 25 doevents           '***************statement covers period 104.03***************** dim countofdays integer dim lngred long  lngred = rgb(255, 0, 0)   countofdays = datediff("d", me.admit_date, me.from_date)   if countofdays > 3     me.from_date.forecolor = lngred     me.label126.visible = true     'select lines on contain dos 3 days prior     'to date of admission , enter reason code 104.03      if fileexists("m:\a_audit\client_" & [forms]![frmclients]![client_id] & "\client_" & [forms]![frmclients]![client_id] & ".xlsx")         docmd.setwarnings (false)         docmd.openquery ("qryerrorcode104-03")         docmd.setwarnings (true)      else          msgbox "please upload itemized statement identify more 3 days" & _     "discrepancy between statement date , admission date."      end if  end if me.progressbar1.value = 50 'we @ second leg set 50 doevents  '***************diagnosis code incorrect patients age 104.07***************** dim count integer docmd.setwarnings (false) docmd.openquery ("qryerrorcode104-07 -1") count = dcount("*", "qryerrorcode104-07 -2") if count > 0 me.label123.visible = true end if docmd.deleteobject actable, "tmp10407" docmd.setwarnings (true)  me.progressbar1.value = 75 'we @ 3rd leg set 75 doevents   '***************diagnosis code incorrect patients sex 104.08*****************  docmd.setwarnings (false) docmd.openquery ("qryerrorcode104-08 -1") count = dcount("*", "qryerrorcode104-08 -2") if count > 0 me.label124.visible = true end if docmd.deleteobject actable, "tmp10408" docmd.setwarnings (true) me.progressbar1.value = 100 'we done set 100  end sub 

Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -