By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,825 Members | 967 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,825 IT Pros & Developers. It's quick & easy.

MS Access Calendar

100+
P: 135
Admin Note
This thread has been closed as it has gotten just too big.

If you have any questions about the application discussed in this thread please start a new thread in MS Access by clicking on the Start a Discussion button and link to the this thread in your question.


Original Question
Just wondering...Am I the only one in the access universe that would like an Outlook like calendar option? Is there such a thing as a calendar that can be used for data entry? You know...double click the day and "POP" up comes the event screen to enter data into. I have spent countless hours searching for such a phantom. Any thoughts or sites with a template/example/download?

Admin Edit
For ease of usage I will include a link here to the post in this thread with the latest version of the solution database.

Currently this is at Post #298.

Alternatively, if the attachment is all you require, then you'll find it here (Calendar.zip).

A wide angled version (for wider screen real-estate) has also been posted now at Post #327. The attachment there is Wide Calendar with Switchboard.zip.
Jan 19 '08
Share this Question
Share on Google+
340 Replies


P: 22
I am in the United States.

I adjusted the code as indicated above to see if that would make a difference, but there was not change in the outcome.

I have converted the database to the 2003 version as you requested.

It seems that this is a SQL Server issue as the information displays properly when the table is in access instead of linked through an ODBC connection to the SQL Server.

For example:

The database connected to the SQL Server does not properly display the data for 11/2/2010. The data is displayed properly in the list box, but it is not shown in the calendar grid.

In the attached database, the data for 11/2/2010 is displayed properly in the list box and the calendar grid.
Attached Files
File Type: zip ConfCtr_Smpl.zip (119.2 KB, 342 views)
Nov 23 '10 #301

ADezii
Expert 5K+
P: 8,615
I'm at a real loss on this one. The only thing that I can come up with is the fact that in the SQL Statement that defines the Recordset that populates the Calendar, lngFirstOfMonth and lngLastOfMonth are actually LONG INTEGER values and maybe may need to be coerced to Date. This would hardly explain, of course, why only a few Dates are not properly displayed.
Expand|Select|Wrap|Line Numbers
  1. strSQL = "SELECT * From dbo_vwCalendar "
  2. strSQL = strSQL & "WHERE dbo_vwCalendar.[MeetingDate] Between " & lngFirstOfMonth & " And " & lngLastOfMonth & _
  3.                   " ORDER BY dbo_vwCalendar.[EventID];"
Nov 23 '10 #302

P: 22
Thanks so much for your help. I will keep searching for a solution.
Nov 24 '10 #303

NeoPa
Expert Mod 15k+
P: 31,299
ADezii, if you tell me what the field type of [MeetingDate] is, and post the resultant SQL produced where you know it is failing, then I will look into what is going wrong here for you. I see this as a very important thread and will be happy to help if I can.
Nov 24 '10 #304

P: 22
[MeetingDate] is a datetime field. I have attached a screen shot of the calendar connected to the SQL Server.

As mentioned in a previous post, you can see that November 2, 2010 is selected on the calendar. The box in the calendar grid is empty, but the list box displays all of the events that take place on that date.

Attached Images
File Type: jpg Calendar_MeetingDate.jpg (48.8 KB, 6236 views)
Nov 24 '10 #305

ADezii
Expert 5K+
P: 8,615
This is a tough one, NeoPa, and as always you help will be greatly appreciated. Per the OP:
  1. The Code works as intended when the Back End is converted to Access 2003 Format.
  2. In SQL Server Format, only a few Dates do not display properly, but only in the Calendar itself, and NOT in the Events List Box.
  3. The Code is quite extensive, but I'll post below what I feel are the relevant issues, namely:
    1. The SQL Statement that will create the actual Recordset that will populate a String Array, which in turn provides the Calendar with the actual Data for display on each Date. This code is posted below (strEvent is the String Variable that directly writes Data to the Calendar Blocks):
      Expand|Select|Wrap|Line Numbers
      1. Private Sub PopulateCalendar()
      2. '...Code intentionally omitted
      3. Set db = CurrentDb
      4.  
      5. strSQL = "SELECT * From dbo_vwCalendar "
      6. strSQL = strSQL & "WHERE dbo_vwCalendar.[MeetingDate] Between " & lngFirstOfMonth & " And " & lngLastOfMonth & _
      7.                   " ORDER BY dbo_vwCalendar.[EventID];"
      8.  
      9. Set rstEvents = db.OpenRecordset(strSQL, dbOpenDynaset, dbSeeChanges)    'Added 4/16/2008
      10.  
      11. Do While Not rstEvents.EOF
      12.   strEvent = "[" & rstEvents![EventID] & "] - " & rstEvents![EventTitle]
      13.   bytEventDayOfMonth = (rstEvents!MeetingDate - lngLastOfPreviousMonth)
      14.   bytBlockCounter = bytEventDayOfMonth + bytBlankBlocksBefore
      15.     If astrCalendarBlocks(bytBlockCounter) <> "" Then
      16.       astrCalendarBlocks(bytBlockCounter) = _
      17.       astrCalendarBlocks(bytBlockCounter) & vbNewLine & strEvent
      18.     Else
      19.       astrCalendarBlocks(bytBlockCounter) = strEvent
      20.     End If
      21.     rstEvents.MoveNext
      22. Loop
      23. '...Code intentionally omitted
    2. The Sub-Routine that populates the Events List Box which is 'ALWAYS' correct.
      Expand|Select|Wrap|Line Numbers
      1. Private Sub PopulateEventsList(ctlDayBlock As Control)
      2. On Error GoTo Err_PopulateEventsList
      3. Dim strSQL2 As String
      4.  
      5. strSQL2 = "SELECT dbo_vwCalendar.[EventID] As [ID], dbo_vwCalendar.[EventTitle] As [Event Title], " & _
      6.           "dbo_vwCalendar.[MeetingDate] As [Meeting Date], " & _
      7.           "dbo_vwCalendar.[EndDate] As [End Date]" & _
      8.           "FROM dbo_vwCalendar WHERE dbo_vwCalendar.[MeetingDate] = " & _
      9.           ctlDayBlock.Tag & " ORDER BY dbo_vwCalendar.[EventID];"
      10.  
      11. lstEvents.RowSource = strSQL2
      12.  
      13. lblEventsOnDate.caption = Format(ctlDayBlock.Tag, "m-dd-yyyy")
      14. lstEvents.Visible = True
      15. lblEventsOnDate.Visible = True
      16.  
      17. Exit_PopulateEventsList:
      18.   Exit Sub
      19.  
      20. Err_PopulateEventsList:
      21.   MsgBox Err.Description, vbExclamation, "Error in PopulateEventsList()"
      22.   Resume Exit_PopulateEventsList
      23. End Sub
  4. If you can solve this one, you get a giant Chocolate Chip Cookie, presently I am stumped. It definitely appears to be an SQL, and not Access, issue.
@nerd4access - If there is any critical information that I have omitted or misrepresented, please make both NeoPa and myself aware of this.

@nerd4access - Just out of curiosity, remove the dbSeeChanges Option in Post #354, Code Line# 9, and see if it makes a difference.
Nov 24 '10 #306

P: 22
@Adezii - your description of the issue is accurate. The issue always surrounds the 1st and 2nd of the month. It appears that the issue arises with the 15th and the 22nd on occasion. It is quite strange that it only affects those dates.
Nov 24 '10 #307

ADezii
Expert 5K+
P: 8,615
@nerd4access - Have you tried removing the dbSeeChanges Option in Post #354, Code Line# 9, to see if it makes a difference?

@nerd4access - One important highlight, with NeoPa on the case, you got the best helping you!

@NeoPa - What do you think about asking the SQL Server Guys to have a look at this specific problem, if we cannot get it resolved?
Nov 24 '10 #308

P: 22
@Adezii - Removing the dbSeeChanges Option provided the same result.

I feel very fortunate to have the help of both you and NeoPa as I am self taught in MS Access, VBA, and SQL.

Any help that you can provide is greatly appreciated.
Nov 24 '10 #309

NeoPa
Expert Mod 15k+
P: 31,299
That's good info ADezii, but if you could post the resultant SQL produced where you know it is failing, that would be even more help. I'm guessing your using integral values to represent dates, but without the exact SQL produced I'm either guessing or reading up on the thread so far - which might prove quite a lot of work after >350 posts :-D

My initial thinking is that such a format for checking dates is not a supported one and that the DateValue() function may be a more appropriate alternative, but I'm largely guessing with limited knowledge of what you're really doing so I can't be sure.

This might be a good reason to get Skype going and we can discuss things in greater detail. Still your call of course (I really don't want to press), but seems a particularly appropriate juncture.
Nov 24 '10 #310

P: 22
I am not exactly sure where SQL is failing. I do not receive an error message of any kind and the data in the linked table is accurate.

Let me see if I can provide some background:

My tables for the access front end are linked to a database on the SQL Server (2005). I wanted to query the data in SQL before pushing it to the front end to make the database run faster. With that being said, I created a view called 'dbo.vwCalendar'.

My SQL Statement for 'dbo.vwCalendar' is as follows:

Expand|Select|Wrap|Line Numbers
  1. SELECT DISTINCT 
  2.                       dbo.tblEventSetup.SetupID, dbo.tblEvents.EventID, CASE WHEN OptEventName IS NULL THEN EventName WHEN OptEventName IS NOT NULL 
  3.                       THEN OptEventName END AS EventTitle, dbo.tblEvents.Status, dbo.tblEventSetup.MeetingDate AS MtgStartDate, 
  4.                       dbo.tblEvents.EndDate AS MtgEndDate, CASE WHEN dbo.tblEventSetup.ProgramStartTime IS NULL THEN CONVERT(varchar, 
  5.                       dbo.tblEvents.ProgramStartTime, 108) WHEN dbo.tblEventSetup.ProgramStartTime IS NOT NULL THEN CONVERT(varchar, 
  6.                       dbo.tblEventSetup.ProgramStartTime, 108) END AS ProgramStart, CASE WHEN dbo.tblEventSetup.ProgramEndTime IS NULL THEN CONVERT(varchar, 
  7.                       dbo.tblEvents.ProgramEndTime, 108) WHEN dbo.tblEventSetup.ProgramEndTime IS NOT NULL THEN CONVERT(varchar, 
  8.                       dbo.tblEventSetup.ProgramEndTime, 108) END AS ProgramEnd, 
  9.                       dbo.tblEventSetup.MeetingDate + 2 + CASE WHEN dbo.tblEventSetup.ProgramStartTime IS NULL 
  10.                       THEN dbo.tblEvents.ProgramStartTime WHEN dbo.tblEventSetup.ProgramStartTime IS NOT NULL 
  11.                       THEN dbo.tblEventSetup.ProgramStartTime END AS StartTime, dbo.tblEvents.EndDate + 2 + CASE WHEN dbo.tblEventSetup.ProgramEndTime IS NULL 
  12.                       THEN dbo.tblEvents.ProgramEndTime WHEN dbo.tblEventSetup.ProgramEndTime IS NOT NULL 
  13.                       THEN dbo.tblEventSetup.ProgramEndTime END AS EndTime, dbo.tblEvents.Category, dbo.tblEventSetup.MeetingDate, dbo.tblEvents.EndDate 
  14.  
  15. FROM         dbo.tblEvents INNER JOIN
  16.                       dbo.tblEventSetup ON dbo.tblEvents.EventID = dbo.tblEventSetup.Event
  17. WHERE     (dbo.tblEvents.Status <> 'Cancelled') AND (dbo.tblEvents.Status <> 'Released')
I included a copy of the data produced from this view in the database attached to post #349

Does this information help?

Note: I wasn't sure if I should post the select statement as code, but I did it any just to be sure.
Nov 24 '10 #311

NeoPa
Expert Mod 15k+
P: 31,299
That's good background information, but probably not quite what we're looking at for now.

My main interest now is in looking at the exact SQL produced by the code in post #350. When I have that I will do what tests I can locally to determine what I would expect to see happening, and we can go from there. Not having access to all your SQL Server data may prove a problem, but we'll handle that when we get that far.

As for your view though, did you notice that on lines #9 through #11, where [StartTime] is calculated, you check for dbo.tblEventSetup.ProgramStartTime being NULL, then add the field whether it is or not?

It's clear from the view's SQL though, that [MeetingDate] is passed through unaffected, from the source (dbo.tblEventSetup), which is helpful to know.
Nov 25 '10 #312

ADezii
Expert 5K+
P: 8,615
@nerd4access - I do believe that I may have arrived at a possible solution, but before I get too excited and explain how it came about, I'll let you make the final decision. It appears as though all LONG INTEGER Date representations, when they appear in SQL Statements, have to be explicitly converted to Dates and Delimited. I am referring to the lngFirstOfMonth and lngLastOfMonth Variables, as well as the Tag Property of each Control Block. Try the following two fixes, then let me know:
  1. In the PopulateCalendar() Sub-Routine, change the SQL Statement to:
    Expand|Select|Wrap|Line Numbers
    1. strSQL = "SELECT * From dbo_vwCalendar "
    2. strSQL = strSQL & "WHERE dbo_vwCalendar.[MeetingDate] Between #" & CDate(lngFirstOfMonth) & "# And #" & CDate(lngLastOfMonth) & _
    3.                   "# ORDER BY dbo_vwCalendar.[EventID];"
  2. In the PopulateEventsList() Sub-Routine, change the SQL Statement to:
    Expand|Select|Wrap|Line Numbers
    1. strSQL2 = "SELECT dbo_vwCalendar.[EventID] As [ID], dbo_vwCalendar.[EventTitle] As [Event Title], " & _
    2.           "dbo_vwCalendar.[MeetingDate] As [Meeting Date], " & _
    3.           "dbo_vwCalendar.[EndDate] As [End Date]" & _
    4.           "FROM dbo_vwCalendar WHERE dbo_vwCalendar.[MeetingDate] = #" & _
    5.           CDate(ctlDayBlock.Tag) & "# ORDER BY dbo_vwCalendar.[EventID];"
  3. Good Luck, and let us know how you make out.
Nov 25 '10 #313

NeoPa
Expert Mod 15k+
P: 31,299
... not forgetting of course, that date strings should always be formatted into SQL date format (See Literal DateTimes and Their Delimiters (#)) to insert into a SQL string. Omitting the formatting only works when the code is run in the USA and locales where the date format matches the SQL standard format of m/d/y. In other locales this will fail in some places, and be very difficult to spot (as it will always determine the intention unless the date is entirely ambiguous - EG 1/2/2010, where you would need to know the format used to interpret it correctly, but not 13/1/2010, as that would never occur naturally in SQL format so it will realise the error and handle it correctly anyway).
Nov 25 '10 #314

P: 22
@Adezii - I tried the fixes you suggested. With those changes neither the calendar nor the list box were populated with data; however an error was not produced.


I thought it may be useful to add a screenshot of the SQL produced for dbo_vwCalendar (the view on which the calendar form is based).


@NeoPa - I am not sure if I have provided a good answer to your inquiry about "where SQL is failing". Can you provide some more insight as to what information you may need? Also, I spoke with our IT guy this morning in regards to a Skype call. He said that would be fine if needed and he is checking with our network folks to see if we can do a WebX session if that is needed as well.

Again, thank you both for providing such wonderful assistance. I am sure everyone that has reviewed this very informative thread appreciates your insight and hard work.
Nov 29 '10 #315

ADezii
Expert 5K+
P: 8,615
Obviously, my brilliant solution did not work (LOL), but all may not be lost. Let me tell you exactly what I did, the results obtained, and what may be a clue to he Final Solution.
  1. As you are well aware, I requested, and you then sent, me the Data in Access 2003 Format in the form of the dbo_vwCalendar Table.
  2. The Calendar worked perfectly as expected.
  3. I then took the following steps:
    1. Migrated the dbo_vwCalendar Table to a SQL Server 2000 Database (Northwind) via DTS (Data Transformation Services).
    2. Renamed the dbo_vwCalendar Table in what will now be an Access 2003 Front End.
    3. Linked to the newly migrated SQL Server 2000 dbo_vwCalendar Table via ODBC.
    4. Open the Calendar Form now linked to a Back End Table in a SQL Server 2000 Database via ODBC, and the exact problem as you initially described appeared.
    5. Made the changes as I previously described, namely: explicitly converting the LONG Values to Dates then Delimiting them in the SQL Statements, and the Calendar now functioned properly.
    6. Long story short, this is why I thought I had arrived at a solution.
  4. We gotta be fairly close, I'll keep on pecking away...
Nov 29 '10 #316

P: 22
@Adezii - You are brilliant! After reading your updated post. I went back to try the code again. Apparently it must have been a fluke as to why it did not work the first time. After trying it again this morning with fresh eyes....it did exactly what you said it would.

You are a true genius! Thank you so much for all of your help.

As a side note, I did not have to change PopulateEventsList() sub-routine. The updated code as listed in Post #361 made the list go blank. Leaving the code as it was works perfectly with the updated code for the PopulateCalendar() sub-routine.

Again, thank you so much for all of your hard work! You and NeoPa are greatly appreciated.
Nov 30 '10 #317

ADezii
Expert 5K+
P: 8,615
From both NeoPa and myself, you are quite welcome.

@NeoPa - Hope you didn't mind me speaking on your behalf in this case.

@nerd4access - Way to hang in there and work the problem out - your perseverance is commendable!
Nov 30 '10 #318

NeoPa
Expert Mod 15k+
P: 31,299
ADezii:
@NeoPa - Hope you didn't mind me speaking on your behalf in this case.
I'm only embarrassed that I didn't manage to contribute anything here ADezii. I went AWOL for a few days. Thankfully my lapse didn't seem to cause too many problems. Had I been any help - I'd always know that you could speak on my behalf. I like to come across as a gentleman, and you never fall below that standard.
Dec 3 '10 #319

NeoPa
Expert Mod 15k+
P: 31,299
No need to navigate there. It is also available in the top post - visible on each page. It was put there to avoid the necessity to find and navigate to the post with the latest attachment ;-)
Dec 8 '10 #320

ADezii
Expert 5K+
P: 8,615
Thanks NeoPa, forgot all about that Option! (LOL).

BTW, we should make a horror movie out of this Thread titled:
The Thread That Wouldn't Die!
Dec 9 '10 #321

P: 3
Hey ADezii,

Thanks for the help. I downloaded your calendar.zip and can already see how much this will help me in an endeavor to automate patient treatment schedules.

Have a great holiday season!

Elliott
Dec 9 '10 #322

ADezii
Expert 5K+
P: 8,615
Elliott, at first glance, the Calendar Application can be rather daunting. What I have done in the past, and what I am doing now, is to create a Basic Demo geared to the specific User's needs. It is by no means comprehensive, but it will give you a much clearer picture of how the Calendar Application works, and of the functionality it exposes. Another distinct advantage of the Demo is that if you should have a problem or question, we are both looking at the same Code, thereby making a solution much easier to arrive at. In any event, download the Attachment, and should you have any questions, we are here.

P.S. - I also have a 'Wide' Calendar which I use for the following Resolutions (1024 X 768, 1152 X 864). Let me know if your Screen Resolution falls within this Range and I'll Upload that one to you.
Attached Files
File Type: zip Patients.zip (145.4 KB, 476 views)
Dec 9 '10 #323

P: 3
Good morning ADezii,

I had no problems understanding your code and have actually started working on the SQL portion to read my database tables. You've done a great job on this and I really appreciate you allowing others, like me, to get a jump start on an application needing a calendar.

Have a great weekend, I'll update you as I move along.

Elliott
Dec 10 '10 #324

ADezii
Expert 5K+
P: 8,615
Hope it works for you, Elliott. As stated in the previous Post, a 'Wide' Version of the Calendar is now available for Screen Resolutions >= 1024 X 768. The extra Real Estate gained on the Date Blocks as well as the Events List Box is well worth the effort of downloading it if you so desire. Just let me know, and I'll make it available to you.
  1. BTW, the PopulateCalendar() and PopulateEventsList() Procedures should be 'Private' in Scope and NOT 'Public'. I was experimenting and forgot to change them back.
  2. If you look carefully at the Code in PopulateCalendar(), you'll see that it is also designed to work with a Start and End Date Range which would be displayed sequentially. If this should be your case, be advised that additional Coding will be required in the PopulateCalendar() Sub-Routine.

    @NeoPa - If I Upload the 'Wide' Version of the Calendar, can you kindly make it available with the Standard Version in the Stuck Post? Thank you.
Dec 10 '10 #325

P: 3
Hey ADezii, Yes, I could benefit from the wide version. Thank you.
In my efforts I need to set an appointment date and time, not necessarily a start and end date, but can see the benefit of both. That's where I'm studying your code right now, how to incorporate one or both scenarios. I have been developing a 'scheduler' entirely in MS Access, which has been in use now for several months (always tweaking tho), and adding a calendar function will be a great addition. I schedule literally thousands of appointments for hundreds of patients monthly so efficiency has been my middle name all year.

Thanks again, Elliott
Dec 10 '10 #326

ADezii
Expert 5K+
P: 8,615
@Elliott:
Here is the Wide Version of the Calendar that I was referring to. Be also advised that, in these Demos, Data is entered independently of the Calendars themselves, but this need not be the case. Since each Date Block holds the Value of that Date in its Tag Property, you can easily Open a Form consisting of those Dates only, where you can Edit, Delete, or Add new Appointments for any Date actually. This you can accomplish by adding Code in the Dbl-Click Event of each Date Block (Text Box). If you look, you'll see that Sample Code is already provided for you. Good Luck, and keep in touch.
Attached Files
File Type: zip Wide Calendar with Switchboard.zip (139.7 KB, 4651 views)
Dec 10 '10 #327

NeoPa
Expert Mod 15k+
P: 31,299
ADezii:
If I Upload the 'Wide' Version of the Calendar, can you kindly make it available with the Standard Version in the Stuck Post?
I'm very happy to :-)

I can also confirm that it is available there for Elliott, but in case it's still not visible you can try loading from the stuck post and see if that works for you any better.
Dec 11 '10 #328

ADezii
Expert 5K+
P: 8,615
@NeoPa, thank you.

@Elliott, I can see, and Download, the Attachment from both the Stuck Post and Post #378. The only possible thing that I can think of is that, prior to Attaching a File, you must first Save the Post. You must have viewed the Post at the exact time when I saved it, but before I actually Attached the File. In any event, let us know how you make out.
Dec 11 '10 #329

P: 8
I looked at the attahment. Could you please tell me how the calendar is connected to the table/query? If I can find that I can edit the table and put the data according to my need into it, and then connect it to the calendar.

I'm in the process of developing an access calendar. Thank you.
Feb 15 '11 #330

P: 8
Can you tell me how the query 'qrypatients' is connected to the form 'calendar'?
Feb 15 '11 #331

ADezii
Expert 5K+
P: 8,615
Could you please tell me how the calendar is connected to the table/query?
Look at the Code in the PopulateCalendar() Event in the Code Module of frmCalendar.
Feb 15 '11 #332

P: 8
Thank you for the quick response.

I'm using the calendar given in the path: http://www.access-programmers.co.uk/...=103747&page=2

You can see a zip file here: Input2000.zip

This calendar suits my need becuase I need to print the calendar in Outlook format and paste it on wall.

I looked into the code module of this calendar, but I couldn't find PopulateCalendar().Could you please help me to find out how the calendar form is connected to the table 'tblInput'?
Feb 16 '11 #333

ADezii
Expert 5K+
P: 8,615
@Dalia - PoulateCalendar() is in the Code Module of frmCalendar.
Feb 16 '11 #334

Teddis
P: 3
Hi ADezii,

I saw that you have done a really good job, this is pretty impressive and it works!
I would like to us this calendar but I just noticed a problem: the dates in the calendar are wrong, for example the 9th of may is a thursday but is meant to be a monday. I noticed that there are several problem like the 31st of January is a monday and the 1st of february is a sunday, same problem between the month of May and June 2011. I looked through your code but I don't know how to solve this.
Can you tell me where the problem is from and how to solve it?

Thanks a lot,
May 9 '11 #335

ADezii
Expert 5K+
P: 8,615
I double checked the Calendars, and the Dates appear to be in sync. Where, exactly, do you live, country wise?
May 9 '11 #336

Teddis
P: 3
I am in Sydney Australia. The time in the upper part of the window is right, it shows the right and it matches with my computer's time.
Just the display of the days are wrong.

Attache is a screenshot of the calendar.

Attached Images
File Type: jpg screenshot.jpg (40.8 KB, 88 views)
May 9 '11 #337

ADezii
Expert 5K+
P: 8,615
In the PopulateCalendar Sub-Routine, swap Code Lines 3 and 8:
  1. Current Code State:
    Expand|Select|Wrap|Line Numbers
    1. '*********************** Code intentionally omitted **********************
    2.  
    3. strFirstOfMonth = Str(intMonth) & "/1/" & Str(intYear)
    4.  
    5. '*************************************************************************
    6.   'ADezii
    7.   'NOTE: Will work in the UK (United Kingdom) and other European Nations
    8.   'strFirstOfMonth = "1/" & Str(intMonth) & Str(intYear)
    9. '*************************************************************************
    10.  
    11. '*************************************************************************
  2. Change to:
    Expand|Select|Wrap|Line Numbers
    1. '*********************** Code intentionally omitted **********************
    2.  
    3. 'strFirstOfMonth = Str(intMonth) & "/1/" & Str(intYear)
    4.  
    5. '*************************************************************************
    6.   'ADezii
    7.   'NOTE: Will work in the UK (United Kingdom) and other European Nations
    8.   strFirstOfMonth = "1/" & Str(intMonth) & Str(intYear)
    9. '*************************************************************************
    10.  
    11. '*************************************************************************
May 9 '11 #338

Teddis
P: 3
Thanks!

That was easy, the date is right now.

Cheers for your help,
May 10 '11 #339

NeoPa
Expert Mod 15k+
P: 31,299
Would it be appropriate to suggest that the date format could be determined in the code by referring to the following Registry key? :
Expand|Select|Wrap|Line Numbers
  1. HKEY_CURRENT_USER\Control Panel\International\sShortDate
Module to Read From the Windows Registry may help if you need it.
May 10 '11 #340

NeoPa
Expert Mod 15k+
P: 31,299
Due to the size of this thread, it has been closed to posting until we can sort something out.

ADezii, you can get in touch with me if you want to post something here.

Anybody else, please be patient until we get this issue resolved.
May 10 '11 #341

340 Replies

This discussion thread is closed

Replies have been disabled for this discussion.