Link to home
Create AccountLog in
Avatar of darls15
darls15

asked on

Access calendar database dates placed incorrectly

Hi Experts

I found a calendar/events database on the Internet which I would like to adapt and use. There's only one problem - the dates aren't appearing on the calendar correctly. For example, 17th March is showing as Monday and it should be Tuesday. Other calendars (April, May etc.) are also wrong. I have no idea how to fix this in the code and would appreciate any assistance in getting it right. And is there a way to stop it from constantly blinking at every second change?

Thanks
darls15
Calendar.accdb
Avatar of Hamed Nasr
Hamed Nasr
Flag of Oman image

I ran the database and it gave a correct result for the date mentioned.
Labels are static starting Sunday.
Avatar of darls15
darls15

ASKER

Hi,

I just ran it again to be sure and have attached a screenshot of how it displays for me. March 17 is shows under the Monday header and not Tuesday. April dates are also way out.

Do you have any further advice?

Thanks
darls15
CalendarScreenshot.PNG
From the image you uploaded, I suspect the day labels as they are static. They are not used anywhere in the code.

Try to modify them to start from Monday, and report back.
This is just another example of sloppy code. Dates are sometimes string handled like here:

bytFirstWeekdayOfMonth = WeekDay(strFirstOfMonth)

And the weekday lables are hardcoded.
If you  move the Monday label to the first position and rearrange the others, it may work.

/gustav
Avatar of darls15

ASKER

Hi

Thank you for getting back to me. I've tried your suggestions of moving the labels to the first position. This fixes the calendar for March, however when I move to April, the days and dates do not align. Please see attached screenshot.

I'm don't know how to alter the code to fix this and would appreciate any assistance.

Many thanks
darls15
Avatar of darls15

ASKER

Sorry, the screenshot...
darls15
April.PNG
Oh. The reason is that the code is very US centric, ignoring International standards. It could be recoded but that might be a major work.
I'm confident I could do it, but I don't have the time neither the need. Sorry.

/gustav
ASKER CERTIFIED SOLUTION
Avatar of Hamed Nasr
Hamed Nasr
Flag of Oman image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of darls15

ASKER

Thank you, I really appreciate your help with this.
Welcome!