I want to creat text box
If date = saturday , vacancy
If date = sunday , work
If date = monday , surgery
And so on
How i can make that
I want to creat text box
If date = saturday , vacancy
If date = sunday , work
If date = monday , surgery
And so on
How i can make that
Write a custom VBA function.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Your info on exactly what you're trying to do is sparse...but the general approach would be to use the WeekDay() function. If you're basing this on an entered date...the syntax would be
Code:If WeekDay(Me.DateEntered) = 1 Then Me.YourTextboxName = "Work" 'Sunday If WeekDay(Me.DateEntered) = 2 Then Me.YourTextboxName = "Surgery" 'Monday ........... ............ ............. If WeekDay(Me.DateEntered) = 7 Then Me.YourTextboxName = "Vacancy" 'Saturday
If basing it on the Current Date
And so forth.Code:If WeekDay(Date()) = 1 Then Me.YourTextboxName = "Work"
You could also probably use the Select Case construct instead of If...Then.
Linq ;0)>
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007
Your info on exactly what you're trying to do is sparse...but the general approach would be to use the WeekDay() function. If you're basing this on an entered date...the syntax would be
Code:If WeekDay(Me.DateEntered) = 1 Then Me.YourTextboxName = "Work" 'Sunday If WeekDay(Me.DateEntered) = 2 Then Me.YourTextboxName = "Surgery" 'Monday ........... ............ ............. If WeekDay(Me.DateEntered) = 7 Then Me.YourTextboxName = "Vacancy" 'Saturday
If basing it on the Current Date
And so forth.Code:If WeekDay(Date()) = 1 Then Me.YourTextboxName = "Work"
You could also probably use the Select Case construct instead of If...Then.
Linq ;0)>
THANKS ALOT
REALLY YOU HELPED ME
MANY THANKS
SOLVED