Results 1 to 6 of 6
  1. #1
    Lexus350 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2011
    Posts
    3

    Question Access 2010 - Error Code 438 Problem

    I have a database that tracks food purchased and the price of the item. Monthly I run a report that tells me how much I spent on the food items purchased so I can budget my expenses. This report was running fine in Access 2007 until today when I upgraded to Access 2010. Now I am receiving an error code 438 when trying to run the report. "Object doesn't support this property or method". Then it gives me the option to debug.

    Option Compare Database
    Option Explicit
    Private Sub cmdFinish_Click()
    txtFinish = ctlCalendar.Month & "/" & ctlCalendar.Day & "/" & ctlCalendar.Year
    End Sub
    Private Sub cmdOK_Click()
    If IsNull(txtStart) Or IsNull(txtFinish) Or IsNull(Catagory) = True Then
    MsgBox "You must fill in all required fields, Dumb Ass!", vbCritical
    Exit Sub
    End If
    If LenB(txtFinish) = 0 Or LenB(txtStart) = 0 Then
    MsgBox "Both Start and Finish dates must be filled.", vbCritical
    Exit Sub
    End If


    If CDate(txtFinish) < CDate(txtStart) Then
    MsgBox "The Finish date cannot be before Start date.", vbCritical
    Exit Sub
    End If
    Form.Visible = False
    End Sub
    Private Sub cmdStart_Click()
    txtStart = ctlCalendar.Month & "/" & ctlCalendar.Day & "/" & ctlCalendar.Year
    End Sub
    Private Sub Form_Load()

    With ctlCalendar
    .Day = Day(Now())
    .Month = Month(Now())
    .Year = Year(Now())
    .Visible = True
    End With

    End Sub

    I bolded the area that is in yellow on the debug screen. .Day=Day(Now()). Can someone help me resolve this issue so I can run the report. If more information is needed I will post it.....

  2. #2
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    Did you update your Access Database Engine to Office 14 in the reference section of the VBA work area?

    Alan

  3. #3
    Lexus350 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2011
    Posts
    3
    Hi Alansidman - Thank you for responding to my issue. How do I update the database engine to Office 14 in the reference section of the VBA work area?

  4. #4
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    With your database open, click on Alt +F11. The VBA window will open. Select Tools, References. See if you get a missing references message. If you do, then select them. If not, scroll down until you find MS Access 14.0 Objects, Select it and Save if it is not already selected.

    BTW, the now() function in Access returns a Date and Time. If you only want a Date, then you should use Date().

    Also, look at this

    http://www.articlesbase.com/data-rec...--1339357.html

    Alan

  5. #5
    Lexus350 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2011
    Posts
    3

    Error 438 in Access 2010

    Thank you Alan for all your help. I have found the reason for my error 438. The reason is that Access 2010 does no longer support the calendar control. Microsoft removed the control in Access 2010 for security reasons. What I had to do to make my report run was remove in VB code that pointed to the calendar control which removed the calendar. I was then left with the same unbound boxes for Start Date and End Date. In turn a calendar would appear for each box when I pointed my mouse to the corresponding boxes. I then picked the date range and the report runs fine.

  6. #6
    pkstormy's Avatar
    pkstormy is offline Access/SQL Server Expert
    Windows XP Access 2003
    Join Date
    Mar 2010
    Location
    Madison
    Posts
    682
    Quote Originally Posted by Lexus350 View Post
    Thank you Alan for all your help. I have found the reason for my error 438. The reason is that Access 2010 does no longer support the calendar control. Microsoft removed the control in Access 2010 for security reasons. What I had to do to make my report run was remove in VB code that pointed to the calendar control which removed the calendar. I was then left with the same unbound boxes for Start Date and End Date. In turn a calendar would appear for each box when I pointed my mouse to the corresponding boxes. I then picked the date range and the report runs fine.

    Correct! For some (idiotic) reason, MSAccess 2010 has done away with making the activeX Calendar Control available. This rather dumb-founded change has put a halt on us from upsizing all of our apps from 2003/2007 to 2010 (dumb, idiotic, stupid, @#$#!, etc...etc...). I don't buy the 'Security' reason. To me, they simply took the easy way out rather than trying to figure out a way to support all the many developers who have used the Calendar Control in all their projects (THE LEAST thing they could've done is made it so upsizing from previous versions with the Control would automatically fix it during the upsizing!)

    My personal opinion (and only my personal opinion), is that there is some supervisor at Microsoft controlling the MSAccess development who doesn't have a clue about development and what tools have/have not been widely used. This person doesn't seem to realize that there might be a lot of developers who have used the calendar control in dozens/hundreds of their applications which would require a LOT of work before they could be upsized to MSAccess 2010! So instead of doing the "right" thing which is to find a way to automatically fix these apps when upsizing (or fix their #@!$ Calendar Control but still keep it available), they chose to simply abandon it. Wake Up Microsoft!!!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. 2010 Replication Problem
    By asearle in forum Access
    Replies: 1
    Last Post: 03-30-2011, 12:47 PM
  2. Code does not work in 64 Bit Access 2010
    By mwolfod in forum Programming
    Replies: 26
    Last Post: 12-12-2010, 04:39 PM
  3. Access 2010 Problem
    By DSTR3 in forum Access
    Replies: 7
    Last Post: 11-29-2010, 05:11 PM
  4. Access 2007 to Access 2010 Problem
    By evalmedi in forum Access
    Replies: 1
    Last Post: 10-24-2010, 02:56 PM
  5. Just got Access 2010-run application problem
    By lycialive in forum Forms
    Replies: 0
    Last Post: 07-09-2010, 08:17 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums