Hi All
I was hoping somebody could help me.
I need some VB code to trigger an event such as a text box on Monday each week. It's for a database I am writing at work and I need it to i display a text box stating that calibration is due on Monday every week
Any help will be greatly appreciated
Cheers
Hi!
I use Rapid-Q basic, but in VB it's similar imho/
You can use DATE$ function
A function that returns a string containing the current date formatted as MM-DD-YYYY. Where MM = month (1-12), DD = day (1-31) and YY = year (1980-2099)
To get Weekday you can use this function
Weekday(Date[, FirstDayOfWeek])
heh.. you also can use this Win Api funtion from VB.
'-----------------
Private Declare Sub GetSystemTime Lib "kernel32" (lpSystemTime As SYSTEMTIME)
Private Type SYSTEMTIME
wYear As Integer
wMonth As Integer
wDayOfWeek As Integer
wDay As Integer
wHour As Integer
wMinute As Integer
wSecond As Integer
wMilliseconds As Integer
End Type
Private Sub Form_Load()
'KPD-Team 1998
'URL:
http://www.allapi.net/
'KPDTeam@Allapi.net
Dim SysTime As SYSTEMTIME
'Set the graphical mode to persistent
Me.AutoRedraw = True
'Get the system time
GetSystemTime SysTime
'Print it to the form
Me.Print "The System Date is:" & SysTime.wMonth & "-" & SysTime.wDay & "-" & SysTime.wYear
Me.Print "The System Time is:" & SysTime.wHour & ":" & SysTime.wMinute & ":" & SysTime.wSecond
End Sub
WBR, Andrew