Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calendar FirstDay problem

Status
Not open for further replies.

UHNSTrust

Technical User
Dec 2, 2003
262
GB
I have developed an access97 db with a calendar control(8) activeX control on a form.

On my windows98 machine the FirstDay shows as Sunday (as the setting is set). On my WinXp machine the FirstDay shows as Monday. WHY?

I have tried code ActiveXctrl.Firstday = 1 (1 should be Sunday) but still no help. The funny thing is that if I set the Firstday to 7 then it does show correct on the XP machine (sunday) but then it cocks up the 98 machine (saturday).

Has anybody any suggestions/code that could help.

Thanks

Jonathan
 
Jonathan
In your calendar control properties, you can set the first day of the week to either Sunday or Monday. Does that make a difference?

At least, you can do that with Access 2000. Not sure about 97.

Tom
 
Tom,

Thanks for the reply. I don't think this is an Access problem but more of a regional/PC problem. Under XP changing the calendar control properties makes no difference. It is set to Sunday but still opens on screen as Monday. Under 98 the changes are correct.

Any other ideas?

Jonathan
 
Jonathan
I am running Windows XP, and using Access 2000, and my calendar begins on Sunday.

I did have one thought...on the XP machine, is it possible that Microsoft Outlook is set for the first day of the week to be Monday (some people prefer their calendar that way)? And is it possible that the Outlook setting carries over into other Office stuff, which would include Access?

Anyway, open Outlook, go to Tools>Options>Preferences>Calendar
and check to see.

Just a shot in the dark Jonathan.

Tom
 
Tom,

Just tried what you suggested. It was set at Monday. But unfortunately it has not made any difference.

Jonathan
 
Just noticed that in Win98 that the FirstDay drop down is listed Sun-Sat where in XP the list is Mon-Sun.

It must be some internal setting in the oeprating system.

Anybody have any idea as this is a multi user front end on various operating systems?

Jonathan
 
Jonathan
Where are you finding that first day drop-down in Windows XP? I have been looking high and low for it.

In any event you may be able to force things on a multi-user platform by using the weekday function.
Me.YourDateField = Weekday(Date, vbSunday)

Where I have vbSunday, in Help that shows as firstdayofweek, and can be changed to vbMonday or whatever.

The other option, I suppose, depending upon how many computers are involved, is to be sure that everybody sets their "first day drop down" to Monday.

Tom
 
Sorry for not being more clear. The list I am talking about is on the calendar properties (FirstDay) and is listed differently depending on the operating system that I have it in design view.

I am not sure if this is something particular to Calendar control 8.0 and XP.

I am not sure how the Weekday function is going to help. Could you elaborate as I thought that this just returned the day number of the date passed (and you can specify where to start counting from [FirstDayOfWeek])?

Thanks again for your time Tom.

Jonathan
 
Jonathan
Oh, okay. I thought you were finding that somewhere in the Windows XP settings, and I couldn't find anything.

I also did a search through the Microsoft site and couldn't find anything there that pertains to how to change the first day of the week setting in Windows XP.

Yes, you are right, the expression I posted just indicates where things start counting from...so on a multi-user database that really wouldn't work.

I'll bet there's a module sitting out there somewhere that takes care of this, because I'd be pretty sure that somebody else has run into the same problem.

If I can find anything further, I'll let you know.

It's the proverbial needle in the haystack, isn't it?

Tom
 
Yes. Bugging me.

There must be some heavyweight programmer out there who has some code to sort this out.

I could look into the possibility of findign the Operating system and passign a different firstDay depending on the operating system (a bit of a messy fix!).

Jonathan
 
Jonathan
I guess I don't understand why the machines with Windows XP set the first day of the week to Monday in the Calendar control. That seems weird.

As I indicated earlier, I run Windows XP and the first day of the week in my calendar control is set to Sunday...and I have never changed that setting from anything else. Although it is calendar control 9.

Maybe it's the interaction of calendar control 8 in Office 97 and Windows XP.

Geesh.

Tom
 
I'm definitely confused here. My activex calendar in Access 2003 has a FirstDay property that I can set to any day of the week, and the calendar adjusts the selected day to the left hand edge of the calendar. What am I missing here.

Paul
 
Paul
Hi. The problem that Jonathan is having is that the database is developed in Access 97, with the operating system as Windows 98, and the calendar control shows the first day of the week as Sunday. But when that database front end is used on a computer running Windows XP, the first day of the week setting is Monday.

What would cause that? Seems weird to me.

Tom
 
Paul,

I can set the firstday value in each operating system and it will be OK when I open the form. The problem is I develop in a multi-user environment where some users have Win98, NT and XP. What I do is distribute a new front end (after development) via a batch file and the user can open it without me having to visit each machine.

My problem is that different machines are showing the calendar control differently depending on the operating system. Users have asked for consistency when they move between machines.

Hope this explains it a bit better.

Jonathan
 
I went and posted a question in the XP forum in hopes that someone there might have a solution

thread779-1058852

If I hear anything, I'll post it here, and you can follow it there if anything shows up.

Paul
 
Jonathan, I assume you have seen the responses in the WinXP forum. I would say you need to verify that your settings in the first and last boxes in Control Panel...Regional and Language Options is set to English(United States) and United States respectively(and I would assume that this has to be done on all the XP machines). If that's OK, then I'm thinking Tom's suggestion that it might be a problem between Calendar Control 8.0 and WinXP could be it. I don't know if you could upgrade the calendar to 9.0 and still get A97 to recognize it but in some neutral site, it might be worth testing.

Paul
 
Paul thanks for the effort. I have tried changing regional setting but with no luck.

I will have to look at the possibility of upgrading the calendar control. This may cause licensing issues because we use Office pro but some only have 97 where calendar 9.0 ships with 2000.

Looks like I'm beat.

Thanks for everybody who has spent time on this.

Jonathan
 
Jonathan
Here is a link that you might wish to read.


It contains a "not so subtle" suggestion that the various versions of the Microsoft Calendar control cause problems across different operating systems.

It also gives links to some other "non-Microsoft" approachs to Calendar controls that you might look at if you wish.

All the best.

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top