Solved how to run "after update" event on text box according to set value to number via VBA (1 Viewer)

mobarak ahmed

Member
Local time
Today, 08:27
Joined
May 28, 2021
Messages
95
Hello Dears,
i have a form to record employee monthly Attending and leaving days and over time
i have Combo box have employees names , on the combo box after update i set text box "days" value to "30" as that is the most default number
in text box days i have some events after update it
but it does not work unless i Rewrite 30 or any value on" Days" text box again
any ideas ?
on attaches GIF for review
 

Attachments

  • ezgif-4-3ee2e97a12.gif
    ezgif-4-3ee2e97a12.gif
    162.3 KB · Views: 70

bastanu

AWF VIP
Local time
Yesterday, 23:27
Joined
Apr 13, 2010
Messages
1,402
In the combo's AfterUpdate event after you set the Days to 30 on the next line call its AfterUpdate sub:
Code:
Me.Days=30
Call Days_AfterUpdate()
Cheers,
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 14:27
Joined
May 7, 2009
Messages
19,245
if you want to use the Exact days in a month when you choose a Period on the combo:

' actual number of days on the combobox.
DAY(DATESERIAL(YEAR(CDATE("1 " & [cboPayPeriod])),MONTH(CDATE("1 " & [cboPayPeriod]))+1,0))
 

mobarak ahmed

Member
Local time
Today, 08:27
Joined
May 28, 2021
Messages
95
if you want to use the Exact days in a month when you choose a Period on the combo:

' actual number of days on the combobox.
DAY(DATESERIAL(YEAR(CDATE("1 " & [cboPayPeriod])),MONTH(CDATE("1 " & [cboPayPeriod]))+1,0))
Your post is always helpful 🙏🏻
 

Users who are viewing this thread

Top Bottom