Results 1 to 4 of 4
  1. #1
    Bones is offline Novice
    Windows 2K Access 97
    Join Date
    Jan 2011
    Location
    Desert Aire, WA
    Posts
    6

    Unhappy Error 438 error in Access 97

    I am relatively new at Access code but having an issue with this. I have an 'event' code on each of 2 different checkbox fields that is working just fine. PreferredArea is a text field. The code is as follows:

    Private Sub AreaCalc()
    Me![PreferredArea] = " "

    If Me![Oregon] Then
    Me![PreferredArea] = "Oregon"
    End If

    If Me![Washington] Then
    Me![PreferredArea] = Me![PreferredArea] & ",Washington"
    End If

    End Sub

    The following code should do the same thing on 3 different check box fields. All I want is for the 3 underlying fields (if checked) to add the text to the [Type] field. The field [Type] is also a text field.

    Private Sub TypeCalc()
    Me![Type] = " "

    If Me![TypeHouse] Then


    Me![Type] = "House"
    End If

    If Me![TypeCondo] Then
    Me![Type] = Me![Type] & ",Condo,Plex"
    End If

    If Me![TypeApartment] Then
    Me![Type] = Me![Type] & ",Apartment"
    End If

    End Sub


    I get the following error message:

    Object doesn't support this property or method (Error 438) .

    Not sure why this isn't working.

    Bones

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    1st, Type is a Reserved word and should be avoided. http://www.allenbrowne.com/AppIssueBadWord.html#T
    2nd, You probably have a Control by the same name. Access can easily get confused as to which target you are referring.
    3rd, I would change the name of the field to something like MyType and also the name of the Control to txtMyType. No ambiguity or conflict.

  3. #3
    Bones is offline Novice
    Windows 2K Access 97
    Join Date
    Jan 2011
    Location
    Desert Aire, WA
    Posts
    6

    Access 97 code

    Thank you sooooo much. That was the problem! Why haven't I found this site (you) sooner. I have been struggling now for a month or so with different issues looking on the internet whenever I am stuck. I semi-retired about 5 years ago or so, and am not activitely working in Access any longer. The DB was built by someone else originally. The company brought me back to do some this special project and work in the old Access 97 DB. I may have some other issues I can't resolve and will post again.
    Again, thank you so much!!

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Excellent! Glad we were able to help. Go ahead and use the Thread tool and mark this thread as Solved.

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

Similar Threads

  1. Dll Error in Access 2007
    By preond in forum Import/Export Data
    Replies: 3
    Last Post: 02-09-2012, 11:16 PM
  2. Replies: 2
    Last Post: 12-02-2010, 02:35 AM
  3. Access Error
    By 90awdturbo in forum Access
    Replies: 2
    Last Post: 11-18-2010, 01:09 PM
  4. Access query Error
    By sneupane in forum Programming
    Replies: 2
    Last Post: 03-15-2010, 03:12 PM
  5. Access to SQL error
    By dalet in forum Programming
    Replies: 5
    Last Post: 10-16-2009, 07:43 AM

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