Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    2 Star Lounger
    Join Date
    Jun 2002
    Location
    Loudon, New Hampshire, USA
    Posts
    125
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Error 3320 (Access 2003/Windows XP)

    Hi,
    I have a problem. My client is getting a error that I do not get. The client just got a new HP and is on the bleeding edge with the latest versions of Access and Jet. Their Access would not let my MDB's work until I went to Tools, Macros, Security and move it to Low. Now the problem: I have a Form, which I will call A, that calls Form B. Now on the Client's old machine and on mine, no problem. On the New HP error 3320 - Function is not available in expression in table-level validation expression. Now that is a mouthful that tells me very little. So I stepped thru the VBA code. When the code goes to call a public function called GetProtected, we go into the error routine. Now just to make it more fun. If I close FormB and go back to Form A, and then open Form B again without ever closing Form A. Guess what. No error, everything works! I just do not understand this new feature from Microsoft!
    Sarge

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Error 3320 (Access 2003/Windows XP)

    We will probably need at a minimum the code involved in the GetProtected function - assuming you don't have some missing references. Are you doing any automation of Word, Outlook or Excel - any of those could cause an issue if the references point to a different version? One other question - do you have any table level validation that goes on in either a local table or any linked Access tables?
    Wendell

  3. #3
    2 Star Lounger
    Join Date
    Jun 2002
    Location
    Loudon, New Hampshire, USA
    Posts
    125
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Error 3320 (Access 2003/Windows XP)

    Hi WendellB,
    As I said this worls on 2 machine, it just does not work on this new HP when you go from Form A to Form B the first time. The code for GetProtected is :
    Public Function GetProtected(bytEntitlementCode As Byte) As Boolean

    Dim db As DAO.Database
    Dim rst As DAO.Recordset
    Dim strSQL As String

    On Error GoTo Err_GetProtected

    Set db = CurrentDb

    strSQL = "SELECT tblEntitlement.EntitlementCode, tblEntitlement.Protected "
    strSQL = strSQL & "FROM tblEntitlement "
    strSQL = strSQL & "Where tblEntitlement.EntitlementCode = " & bytEntitlementCode & " ; "

    Set rst = db.OpenRecordset(strSQL)

    rst.MoveFirst

    GetProtected = rst!Protected

    LeaveGetProtected:

    Exit Function

    Err_GetProtected:

    If Err.Number = 3021 Then
    strProgErr = "This Entitlement Code is not on the Entitlement Table"
    Call ProgErr
    Exit Function
    End If

    strErrParagh = "GetProtected"
    strErrNo = Err.Number
    strErrDesc = Err.Description
    Call SysErr

    End Function
    The code that calls it from Form event On Current is:
    Private Sub Form_Current()

    On Error GoTo Err_Form_Current

    DoCmd.Maximize

    If bytKount <> 0 Then
    Exit Sub
    End If

    Me!UpdateDte = Format(Date, "Short Date")
    booProtected = GetProtected(Me!EntitlementCode)

    If booProtected = True Then
    Me!Protected.Enabled = True
    Else
    Me!Protected.Enabled = True
    End If

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Error 3320 (Access 2003/Windows XP)

    In the first place, I don't understand why you call GetProtected, since you do the same regardless of the result:

    booProtected = GetProtected(Me!EntitlementCode)
    If booProtected = True Then
    Me!Protected.Enabled = True
    Else
    Me!Protected.Enabled = True
    End If

    In the second place, have you checked Tools | References on the problem machine for missing references?

  5. #5
    5 Star Lounger
    Join Date
    Apr 2003
    Location
    Hampshire, United Kingdom
    Posts
    602
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Error 3320 (Access 2003/Windows XP)

    Further to Hans' second point, if the problem is reference-related, it may be worth considering setting the references programatically. You can do this using the References Collection.
    Waggers
    If at first you do succeed, you&#39;ve probably missed something.

  6. #6
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Error 3320 (Access 2003/Windows XP)

    Determining that there are broken references is fairly easy in code. Fixing them is trickier and requires an existing reference to the Visual Basic Editor library and code that specifically addresses it.
    Charlotte

  7. #7
    2 Star Lounger
    Join Date
    Jun 2002
    Location
    Loudon, New Hampshire, USA
    Posts
    125
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Error 3320 (Access 2003/Windows XP)

    Hi HansV,
    I checked references and found none. I do have another 3320 error on another form on the following code:
    Me!UpdateDte = Format(Date, "ShortDate"). Also I now know that they have Office 2003 Professional Access, while my mother's son has Office 2002 Professional Access. I am still cornfused! Could this be some undocumented MicroSoft enhancement???
    Sarge <img src=/S/confused.gif border=0 alt=confused width=15 height=20>

  8. #8
    2 Star Lounger
    Join Date
    Jun 2002
    Location
    Loudon, New Hampshire, USA
    Posts
    125
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Error 3320 (Access 2003/Windows XP)

    Waggers,

    I feel like I would be jumping into the deeeeeeeep end of the pool, and I do not know how to swim.

    Sarge

  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Error 3320 (Access 2003/Windows XP)

    It sure looks like a references problem, but...

    On which PC does this latest error occur - the one with Access 2003 or the one with Access 2002?

  10. #10
    2 Star Lounger
    Join Date
    Jun 2002
    Location
    Loudon, New Hampshire, USA
    Posts
    125
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Error 3320 (Access 2003/Windows XP)

    HansV,
    All errors are on the new HP with Access 2003. When I when to VBA, Tools, References, all looked the same. I took my laptop and put it next to their PC, and looked from one screen to the other. Also had Client check me. If it is a reference, what do I do. Kick or punt????
    Sarge <img src=/S/blank.gif border=0 alt=blank width=15 height=15>
    Still no flag for Cow Hampshire I see. <img src=/S/disappointed.gif border=0 alt=disappointed width=15 height=15>

  11. #11
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Error 3320 (Access 2003/Windows XP)

    OK, I believe you that there are no problems with missing references.

    Just grasping at straws here, does the following version of the function work better:

    Public Function GetProtected(bytEntitlementCode As Byte) As Boolean
    On Error GoTo Err_GetProtected

    GetProtected = DLookup("Protected", "tblEntitlement", _
    "EntitlementCode = " & bytEntitlementCode)

    Err_GetProtected:
    If Err.Number = 3021 Then
    strProgErr = "This Entitlement Code is not on the Entitlement Table"
    Call ProgErr
    Else
    strErrParagh = "GetProtected"
    strErrNo = Err.Number
    strErrDesc = Err.Description
    Call SysErr
    End If
    End Function

  12. #12
    2 Star Lounger
    Join Date
    Jun 2002
    Location
    Loudon, New Hampshire, USA
    Posts
    125
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Error 3320 (Access 2003/Windows XP)

    Hi HansV,
    With the HP Access 2003 VBA Having problems with the Format Statement ( Me!UpdateDte = Format(Date(), "Short Date")) shed any light???
    Sarge

  13. #13
    Lounger
    Join Date
    Oct 2001
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Error 3320 (Access 2003/Windows XP)

    You have an error within one of your validation expressions in your table. Check all the tables and fields that these forms use.

  14. #14
    2 Star Lounger
    Join Date
    Jun 2002
    Location
    Loudon, New Hampshire, USA
    Posts
    125
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Error 3320 (Access 2003/Windows XP)

    Hi Swan,
    What? This works on my computer, an ACER laptop. It worked on the client's last computer. It now has problems with the Client's New HP computer. I use Access 2002, but the New HP uses Access 2003. I believe the problem is Access, but I have no Idea where to look.
    Sarge

  15. #15
    2 Star Lounger
    Join Date
    Jun 2002
    Location
    Loudon, New Hampshire, USA
    Posts
    125
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Error 3320 (Access 2003/Windows XP)

    Hi Charlotte,
    If you look at my latest responses, I am having more problems ( either Date() or Format()). Any idea what I can do?
    Sarge

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •