Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / March 2008

Tip: Looking for answers? Try searching our database.

Dteremine the day of the week based on date.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
RAM - 16 Mar 2008 15:23 GMT
I use a calendar control on my schedule form to select dates.  I work the
same day in three different office locations each week.  I want to have a
text box automatically display my office location based on the day of the
week selected on the calandar control.  This will eliminate my office
scheduler from making location mistakes.

Thanks in advance
Signature

AccessRAM

ruralguy - 16 Mar 2008 16:04 GMT
So what are you having trouble with?  What have you tried so far?

>I use a calendar control on my schedule form to select dates.  I work the
>same day in three different office locations each week.  I want to have a
[quoted text clipped - 3 lines]
>
>Thanks in advance

Signature

RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

RAM - 16 Mar 2008 16:11 GMT
I found the answer to my question:

D = DatePart("w", CalValue)

Thanks anyway

Signature

AccessRAM

> I use a calendar control on my schedule form to select dates.  I work the
> same day in three different office locations each week.  I want to have a
[quoted text clipped - 3 lines]
>
> Thanks in advance
George Nicholson - 17 Mar 2008 23:49 GMT
Other approaches:
   Format(CalValue,"dddd")
   WeekdayName(Weekday(calValue),False)

Signature

HTH,
George

>I found the answer to my question:
>
[quoted text clipped - 9 lines]
>>
>> Thanks in advance
Al Campagna - 16 Mar 2008 16:29 GMT
Ram,
> text box automatically "display"
   Given a CalendarControl named for ex. [calMyCalendar]
   Add an unbound text control to your form (ex. [OfficeLocation])

   You didn't indicate whether calMyCalendar or OfficeLocation are bound
fields.  Since you requested "display", I'll assume a "bound" calMyCalendar,
and a "calculated" OfficeLocation.

   Give OfficeLocation of ControlSource of... (Checks for Mon, Tues, Wed)

=IIf(Weekday([calMyCalendar].[Value])=2,"MonOffice",IIf(Weekday([calMyCalendar])=3,"TueOffice",IIf(Weekday([calMyCalendar].[Value])=4,"WedOffice","")))
Signature

   hth
   Al Campagna
   Microsoft Access MVP
   http://home.comcast.net/~cccsolutions/index.html

   "Find a job that you love... and you'll never work a day in your life."

>I use a calendar control on my schedule form to select dates.  I work the
> same day in three different office locations each week.  I want to have a
[quoted text clipped - 3 lines]
>
> Thanks in advance
ruralguy - 16 Mar 2008 16:58 GMT
Al,
I think the Choose() function would be a better choice for your approach.

>Ram,
>> text box automatically "display"
[quoted text clipped - 13 lines]
>>
>> Thanks in advance

Signature

RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.