Error 3220 - Function Is Not Available In Expression In Table Level Validation Expression

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Steve

    Error 3220 - Function Is Not Available In Expression In Table Level Validation Expression

    Hi

    I have a really weird problem and any assistance would be welcome.

    I have developed an app in Access 2002. The app runs perfectly on the
    development machine. I have packaged the app
    using the Microsoft XP Developer Packaging Wizard (Service Pack 1). The 1st
    3 releases of the app ran perfectly on
    site.

    On Friday the 4th release of the app went out to a customer. The app opened
    perfectly but on clicking OK on my login form
    I get the error : 3220 - The functiom is not available in expression in
    table level validation expression.

    I took the 2 main files one mde file containing the application and an mdb
    file containing the data which is linked into the
    mde file from the support directory on the installation CD and copied them
    to a machine which has Office XP Professional
    loaded (as I can not simulate the error on the box used for development). I
    found that when I went into a table that when
    manually entering a record I got the same error, the weird part is neither
    the table nor the code populating the table
    has changed since the 1st release of the app (In fact it is code I use for a
    table and module that I use in many other
    applications).

    The table layout is as follows :

    Key AutoNumber Primary Key
    UserName Text(15) Mandatory
    No Default Value
    SecurityLevel Long Integer Mandatory
    Default Value 0
    DBChanged Text(20) Mandatory
    No Default Value
    RecordChanged Text(100) Mandatory
    No Default Value
    DBAction Text(100) Mandatory
    No Default Value
    DateChanged Date/Time Mandatory
    Default Value Date()
    TimeChanged Date/Time Mandatory
    Default Value Time()
    TillNo Integer
    Default Value 0


    The code used to populate the table is as follows :

    Sub logchg(tbl As String, rec As Variant, action As String)
    Dim srec As String
    Dim logrs As Recordset

    srec = CStr(rec)

    Set logrs = db.OpenRecordse t("tblLog")
    logrs.AddNew
    logrs![UserName] = modGlobals.user
    logrs![SecurityLevel] = modGlobals.Secu rityLevel
    logrs![DbChanged] = tbl
    logrs![RecordChanged] = srec
    logrs![DBAction] = action
    logrs![TillNo] = modGlobals.Till No
    logrs.Update
    logrs.Close
    End Sub

    The call that causes the error is :

    Call modSecurity.log chg("N/A", "N/A", "LOGON")

    Can anyone explain why I get the error ?

    TIA
    Steve


  • Salad

    #2
    Re: Error 3220 - Function Is Not Available In Expression In TableLevel Validation Expression

    Steve wrote:
    [color=blue]
    > Hi
    >
    > I have a really weird problem and any assistance would be welcome.
    >
    > I have developed an app in Access 2002. The app runs perfectly on the
    > development machine. I have packaged the app
    > using the Microsoft XP Developer Packaging Wizard (Service Pack 1). The 1st
    > 3 releases of the app ran perfectly on
    > site.
    >
    > On Friday the 4th release of the app went out to a customer. The app opened
    > perfectly but on clicking OK on my login form
    > I get the error : 3220 - The functiom is not available in expression in
    > table level validation expression.
    >
    > I took the 2 main files one mde file containing the application and an mdb
    > file containing the data which is linked into the
    > mde file from the support directory on the installation CD and copied them
    > to a machine which has Office XP Professional
    > loaded (as I can not simulate the error on the box used for development). I
    > found that when I went into a table that when
    > manually entering a record I got the same error, the weird part is neither
    > the table nor the code populating the table
    > has changed since the 1st release of the app (In fact it is code I use for a
    > table and module that I use in many other
    > applications).
    >
    > The table layout is as follows :
    >
    > Key AutoNumber Primary Key
    > UserName Text(15) Mandatory
    > No Default Value
    > SecurityLevel Long Integer Mandatory
    > Default Value 0
    > DBChanged Text(20) Mandatory
    > No Default Value
    > RecordChanged Text(100) Mandatory
    > No Default Value
    > DBAction Text(100) Mandatory
    > No Default Value
    > DateChanged Date/Time Mandatory
    > Default Value Date()
    > TimeChanged Date/Time Mandatory
    > Default Value Time()
    > TillNo Integer
    > Default Value 0
    >
    >
    > The code used to populate the table is as follows :
    >
    > Sub logchg(tbl As String, rec As Variant, action As String)
    > Dim srec As String
    > Dim logrs As Recordset
    >
    > srec = CStr(rec)
    >
    > Set logrs = db.OpenRecordse t("tblLog")
    > logrs.AddNew
    > logrs![UserName] = modGlobals.user
    > logrs![SecurityLevel] = modGlobals.Secu rityLevel
    > logrs![DbChanged] = tbl
    > logrs![RecordChanged] = srec
    > logrs![DBAction] = action
    > logrs![TillNo] = modGlobals.Till No
    > logrs.Update
    > logrs.Close
    > End Sub
    >
    > The call that causes the error is :
    >
    > Call modSecurity.log chg("N/A", "N/A", "LOGON")
    >
    > Can anyone explain why I get the error ?
    >
    > TIA
    > Steve[/color]

    I have A97, and error 3220 referes to Paradox and 2426 is Function isn't
    available in expressions. Your error has the addendum of
    TableLevelValid ation to my 2426.

    Open up your table tblLog. Do you have a validation rule on any of the
    fields you are updating? Maybe make a copy of the current log table and
    then open the log file and remove any validation rules and text of so.

    If that doesn't help, is there a way to verify what line in LogChg that
    blows up? IOW, step through code and locate which field you are
    updating that is the cause of the problem.




    Comment

    • Steve

      #3
      Re: Error 3220 - Function Is Not Available In Expression In Table Level Validation Expression


      "Salad" <oil@vinegar.co m> wrote in message
      news:Dsowc.2243 7$Tn6.6035@news read1.news.pas. earthlink.net.. .[color=blue]
      > Steve wrote:
      >[color=green]
      > > Hi
      > >
      > > I have a really weird problem and any assistance would be welcome.
      > >
      > > I have developed an app in Access 2002. The app runs perfectly on the
      > > development machine. I have packaged the app
      > > using the Microsoft XP Developer Packaging Wizard (Service Pack 1). The[/color][/color]
      1st[color=blue][color=green]
      > > 3 releases of the app ran perfectly on
      > > site.
      > >
      > > On Friday the 4th release of the app went out to a customer. The app[/color][/color]
      opened[color=blue][color=green]
      > > perfectly but on clicking OK on my login form
      > > I get the error : 3220 - The functiom is not available in expression in
      > > table level validation expression.
      > >
      > > I took the 2 main files one mde file containing the application and an[/color][/color]
      mdb[color=blue][color=green]
      > > file containing the data which is linked into the
      > > mde file from the support directory on the installation CD and copied[/color][/color]
      them[color=blue][color=green]
      > > to a machine which has Office XP Professional
      > > loaded (as I can not simulate the error on the box used for[/color][/color]
      development). I[color=blue][color=green]
      > > found that when I went into a table that when
      > > manually entering a record I got the same error, the weird part is[/color][/color]
      neither[color=blue][color=green]
      > > the table nor the code populating the table
      > > has changed since the 1st release of the app (In fact it is code I use[/color][/color]
      for a[color=blue][color=green]
      > > table and module that I use in many other
      > > applications).
      > >
      > > The table layout is as follows :
      > >
      > > Key AutoNumber Primary Key
      > > UserName Text(15)[/color][/color]
      Mandatory[color=blue][color=green]
      > > No Default Value
      > > SecurityLevel Long Integer[/color][/color]
      Mandatory[color=blue][color=green]
      > > Default Value 0
      > > DBChanged Text(20)[/color][/color]
      Mandatory[color=blue][color=green]
      > > No Default Value
      > > RecordChanged Text(100) Mandatory
      > > No Default Value
      > > DBAction Text(100)[/color][/color]
      Mandatory[color=blue][color=green]
      > > No Default Value
      > > DateChanged Date/Time[/color][/color]
      Mandatory[color=blue][color=green]
      > > Default Value Date()
      > > TimeChanged Date/Time[/color][/color]
      Mandatory[color=blue][color=green]
      > > Default Value Time()
      > > TillNo Integer
      > > Default Value 0
      > >
      > >
      > > The code used to populate the table is as follows :
      > >
      > > Sub logchg(tbl As String, rec As Variant, action As String)
      > > Dim srec As String
      > > Dim logrs As Recordset
      > >
      > > srec = CStr(rec)
      > >
      > > Set logrs = db.OpenRecordse t("tblLog")
      > > logrs.AddNew
      > > logrs![UserName] = modGlobals.user
      > > logrs![SecurityLevel] = modGlobals.Secu rityLevel
      > > logrs![DbChanged] = tbl
      > > logrs![RecordChanged] = srec
      > > logrs![DBAction] = action
      > > logrs![TillNo] = modGlobals.Till No
      > > logrs.Update
      > > logrs.Close
      > > End Sub
      > >
      > > The call that causes the error is :
      > >
      > > Call modSecurity.log chg("N/A", "N/A", "LOGON")
      > >
      > > Can anyone explain why I get the error ?
      > >
      > > TIA
      > > Steve[/color]
      >
      > I have A97, and error 3220 referes to Paradox and 2426 is Function isn't
      > available in expressions. Your error has the addendum of
      > TableLevelValid ation to my 2426.
      >
      > Open up your table tblLog. Do you have a validation rule on any of the
      > fields you are updating? Maybe make a copy of the current log table and
      > then open the log file and remove any validation rules and text of so.
      >
      > If that doesn't help, is there a way to verify what line in LogChg that
      > blows up? IOW, step through code and locate which field you are
      > updating that is the cause of the problem.
      >
      >
      >
      >[/color]
      Thanks for the response, I have no validation rule set up, and the code
      seems to crash on :

      logrs.Update

      which unfortunately tells me nothing.

      Steve


      Comment

      • Salad

        #4
        Re: Error 3220 - Function Is Not Available In Expression In TableLevel Validation Expression

        Steve wrote:
        [color=blue][color=green]
        >>I have A97, and error 3220 referes to Paradox and 2426 is Function isn't
        >>available in expressions. Your error has the addendum of
        >>TableLevelVal idation to my 2426.
        >>
        >>Open up your table tblLog. Do you have a validation rule on any of the
        >>fields you are updating? Maybe make a copy of the current log table and
        >> then open the log file and remove any validation rules and text of so.
        >>
        >>If that doesn't help, is there a way to verify what line in LogChg that
        >>blows up? IOW, step through code and locate which field you are
        >>updating that is the cause of the problem.
        >>[/color]
        > Thanks for the response, I have no validation rule set up, and the code
        > seems to crash on :
        >
        > logrs.Update
        >
        > which unfortunately tells me nothing.
        >
        > Steve
        >[/color]

        OK. You know the line. It is telling you there is a value it doesn't
        like...near as I can tell. I'll assume you know how to step through
        code. If not, click on the bar to the left of the AddNew line that puts
        a dot on the bar and highlights the line. Now run the process. Check
        the values of each item you are updating in the recordset.

        ALso, copy the code and put into a module. Instead of plugging in the
        values in the program, attempt to add with valid values. Ex:
        logrs![UserName] = "Steve"
        Do that for all fields. If you can't add a record with
        plugged-in-manually and the values are correct for the field, maybe you
        have an existing record that conflicts with something.

        When are you calling this? I had a main form that called some functions
        and queries that used NZ() and otherthings like that. Once the form was
        loaded the functions I was using could be used. But on the loading of
        the form, the VBA functions were not available.

        I doubt that is the case if you have been using this method for a while.
        Check your data.

        If you can add a record with manual data and the data looks ok when you
        step through code, then start commenting out a line where you update the
        recordset and keep commenting out an update line until you know which
        one goofs up. Ex:
        logrs![UserName] = "Steve"
        and it blows up. Comment out
        'logrs![UserName] = "Steve"
        and it doesn't blow up. That means there is something wrong with the
        UserName field in the table or else Steve is not a valid value.

        Trial and error may be the easies method to find out what is wrong.





        Comment

        • Michael \(michka\) Kaplan [MS]

          #5
          Re: Error 3220 - Function Is Not Available In Expression In Table Level Validation Expression

          If I had to guess I would guess that it is complaining about one of the
          function calls like Time().


          --
          MichKa [MS]
          NLS Collation/Locale/Keyboard Development
          Globalization Infrastructure and Font Technologies

          This posting is provided "AS IS" with
          no warranties, and confers no rights.



          Comment

          • Steve

            #6
            Re: Error 3220 - Function Is Not Available In Expression In Table Level Validation Expression


            "Salad" <oil@vinegar.co m> wrote in message
            news:yUpwc.2248 4$Tn6.21422@new sread1.news.pas .earthlink.net. ..[color=blue]
            > Steve wrote:
            >[color=green][color=darkred]
            > >>I have A97, and error 3220 referes to Paradox and 2426 is Function isn't
            > >>available in expressions. Your error has the addendum of
            > >>TableLevelVal idation to my 2426.
            > >>
            > >>Open up your table tblLog. Do you have a validation rule on any of the
            > >>fields you are updating? Maybe make a copy of the current log table and
            > >> then open the log file and remove any validation rules and text of so.
            > >>
            > >>If that doesn't help, is there a way to verify what line in LogChg that
            > >>blows up? IOW, step through code and locate which field you are
            > >>updating that is the cause of the problem.
            > >>[/color]
            > > Thanks for the response, I have no validation rule set up, and the code
            > > seems to crash on :
            > >
            > > logrs.Update
            > >
            > > which unfortunately tells me nothing.
            > >
            > > Steve
            > >[/color]
            >
            > OK. You know the line. It is telling you there is a value it doesn't
            > like...near as I can tell. I'll assume you know how to step through
            > code. If not, click on the bar to the left of the AddNew line that puts
            > a dot on the bar and highlights the line. Now run the process. Check
            > the values of each item you are updating in the recordset.
            >
            > ALso, copy the code and put into a module. Instead of plugging in the
            > values in the program, attempt to add with valid values. Ex:
            > logrs![UserName] = "Steve"
            > Do that for all fields. If you can't add a record with
            > plugged-in-manually and the values are correct for the field, maybe you
            > have an existing record that conflicts with something.
            >
            > When are you calling this? I had a main form that called some functions
            > and queries that used NZ() and otherthings like that. Once the form was
            > loaded the functions I was using could be used. But on the loading of
            > the form, the VBA functions were not available.
            >
            > I doubt that is the case if you have been using this method for a while.
            > Check your data.
            >
            > If you can add a record with manual data and the data looks ok when you
            > step through code, then start commenting out a line where you update the
            > recordset and keep commenting out an update line until you know which
            > one goofs up. Ex:
            > logrs![UserName] = "Steve"
            > and it blows up. Comment out
            > 'logrs![UserName] = "Steve"
            > and it doesn't blow up. That means there is something wrong with the
            > UserName field in the table or else Steve is not a valid value.
            >
            > Trial and error may be the easies method to find out what is wrong.
            >
            >
            >
            >
            >[/color]
            Thanks, but I have tried what you are telling me.

            Steve


            Comment

            • Steve

              #7
              Re: Error 3220 - Function Is Not Available In Expression In Table Level Validation Expression

              I think you are correct, but the problem is I have checked out my References
              and everything seems to be in order.

              Steve

              "Michael (michka) Kaplan [MS]" <michkap@online .microsoft.com> wrote in
              message news:40c23215$1 @news.microsoft .com...[color=blue]
              > If I had to guess I would guess that it is complaining about one of the
              > function calls like Time().
              >
              >
              > --
              > MichKa [MS]
              > NLS Collation/Locale/Keyboard Development
              > Globalization Infrastructure and Font Technologies
              >
              > This posting is provided "AS IS" with
              > no warranties, and confers no rights.
              >
              >
              >[/color]


              Comment

              • Michael \(michka\) Kaplan [MS]

                #8
                Re: Error 3220 - Function Is Not Available In Expression In Table Level Validation Expression

                And if you take out the function calls? You might want to humor me and try
                it, just for giggles....

                Out of curiousity, what are the references?

                There is an interesting case where even if all the references are okay that
                a changed path of one of the references typelibs (DLL, OCX, or TLB) can
                cause a partial reference break because the reference fixup does not happen
                properly when the ES is doing the fixup as opposed to VBA doing it directly.
                The workaround (if this is the problem) is to make sure that the references
                are all disambiguated and loaded prior to being used.


                --
                MichKa [MS]
                NLS Collation/Locale/Keyboard Development
                Globalization Infrastructure and Font Technologies

                This posting is provided "AS IS" with
                no warranties, and confers no rights.


                "Steve" <stevej@ufrmsa1 .uniforum.org.z a> wrote in message
                news:c9tdrm$hh5 $2@ctb-nnrp2.saix.net. ..[color=blue]
                > I think you are correct, but the problem is I have checked out my[/color]
                References[color=blue]
                > and everything seems to be in order.
                >
                > Steve
                >
                > "Michael (michka) Kaplan [MS]" <michkap@online .microsoft.com> wrote in
                > message news:40c23215$1 @news.microsoft .com...[color=green]
                > > If I had to guess I would guess that it is complaining about one of the
                > > function calls like Time().
                > >
                > >
                > > --
                > > MichKa [MS]
                > > NLS Collation/Locale/Keyboard Development
                > > Globalization Infrastructure and Font Technologies
                > >
                > > This posting is provided "AS IS" with
                > > no warranties, and confers no rights.
                > >
                > >
                > >[/color]
                >
                >[/color]


                Comment

                • deko

                  #9
                  Re: Error 3220 - Function Is Not Available In Expression In Table Level Validation Expression

                  > I think you are correct, but the problem is I have checked out my
                  References[color=blue]
                  > and everything seems to be in order.[/color]

                  I've experienced similar errors (function not available...) and it turned
                  out to be a references issue. Checking the version and path of the
                  different ocx and dll files and comparing between development and client
                  machines is a logical troubleshooting step. You might try removing all
                  references (on the client machine), closing out of Access, and then going
                  back in and adding them all back.

                  Just my two cents...


                  Comment

                  • Steve

                    #10
                    Re: Error 3220 - Function Is Not Available In Expression In Table Level Validation Expression

                    Thanks the help is appreciated.

                    Steve

                    "deko" <nospam@hotmail .com> wrote in message
                    news:r7ywc.6632 4$PZ1.27676@new ssvr29.news.pro digy.com...[color=blue][color=green]
                    > > I think you are correct, but the problem is I have checked out my[/color]
                    > References[color=green]
                    > > and everything seems to be in order.[/color]
                    >
                    > I've experienced similar errors (function not available...) and it turned
                    > out to be a references issue. Checking the version and path of the
                    > different ocx and dll files and comparing between development and client
                    > machines is a logical troubleshooting step. You might try removing all
                    > references (on the client machine), closing out of Access, and then going
                    > back in and adding them all back.
                    >
                    > Just my two cents...
                    >
                    >[/color]


                    Comment

                    • Steve

                      #11
                      Re: Error 3220 - Function Is Not Available In Expression In Table Level Validation Expression

                      The references are definately OK, I have checked versions against
                      installation versions and unregistered and reregisterd
                      them all.

                      Remember I get the same error when manually inserting a value into the table
                      i.e opening the table and typing in a record,
                      the first time I get the error, the second time the record is inserted. I
                      have also compacted and repaired the database to no availe.

                      As I said in the origional question this is really a weird problem.

                      I'm starting to think it has something to do with the auto number.

                      Steve

                      "Michael (michka) Kaplan [MS]" <michkap@online .microsoft.com> wrote in
                      message news:40c26708$1 @news.microsoft .com...[color=blue]
                      > And if you take out the function calls? You might want to humor me and try
                      > it, just for giggles....
                      >
                      > Out of curiousity, what are the references?
                      >
                      > There is an interesting case where even if all the references are okay[/color]
                      that[color=blue]
                      > a changed path of one of the references typelibs (DLL, OCX, or TLB) can
                      > cause a partial reference break because the reference fixup does not[/color]
                      happen[color=blue]
                      > properly when the ES is doing the fixup as opposed to VBA doing it[/color]
                      directly.[color=blue]
                      > The workaround (if this is the problem) is to make sure that the[/color]
                      references[color=blue]
                      > are all disambiguated and loaded prior to being used.
                      >
                      >
                      > --
                      > MichKa [MS]
                      > NLS Collation/Locale/Keyboard Development
                      > Globalization Infrastructure and Font Technologies
                      >
                      > This posting is provided "AS IS" with
                      > no warranties, and confers no rights.
                      >
                      >
                      > "Steve" <stevej@ufrmsa1 .uniforum.org.z a> wrote in message
                      > news:c9tdrm$hh5 $2@ctb-nnrp2.saix.net. ..[color=green]
                      > > I think you are correct, but the problem is I have checked out my[/color]
                      > References[color=green]
                      > > and everything seems to be in order.
                      > >
                      > > Steve
                      > >
                      > > "Michael (michka) Kaplan [MS]" <michkap@online .microsoft.com> wrote in
                      > > message news:40c23215$1 @news.microsoft .com...[color=darkred]
                      > > > If I had to guess I would guess that it is complaining about one of[/color][/color][/color]
                      the[color=blue][color=green][color=darkred]
                      > > > function calls like Time().
                      > > >
                      > > >
                      > > > --
                      > > > MichKa [MS]
                      > > > NLS Collation/Locale/Keyboard Development
                      > > > Globalization Infrastructure and Font Technologies
                      > > >
                      > > > This posting is provided "AS IS" with
                      > > > no warranties, and confers no rights.
                      > > >
                      > > >
                      > > >[/color]
                      > >
                      > >[/color]
                      >
                      >[/color]


                      Comment

                      • Michael \(michka\) Kaplan [MS]

                        #12
                        Re: Error 3220 - Function Is Not Available In Expression In Table Level Validation Expression

                        Your behavior exactly matches the circumstances I mention below. SO, if you
                        would like to solve the problem:

                        1) ASSUME YOU ARE WRONG.

                        2) List your exact references in your response to this message -- including
                        the drive/dir location of each typelib (DLL, OCX, TLB)

                        3) Try what I asked you to do.

                        All three steps are important for you to try if you truly want to solve the
                        problem. If, on the other hand, you want to keep spinning your wheels and
                        having a problem, then proceed as you are doing now.


                        --
                        MichKa [MS]
                        NLS Collation/Locale/Keyboard Development
                        Globalization Infrastructure and Font Technologies

                        This posting is provided "AS IS" with
                        no warranties, and confers no rights.


                        "Steve" <stevej@ufrmsa1 .uniforum.org.z a> wrote in message
                        news:c9ulio$t8t $2@ctb-nnrp2.saix.net. ..[color=blue]
                        > The references are definately OK, I have checked versions against
                        > installation versions and unregistered and reregisterd
                        > them all.
                        >
                        > Remember I get the same error when manually inserting a value into the[/color]
                        table[color=blue]
                        > i.e opening the table and typing in a record,
                        > the first time I get the error, the second time the record is inserted. I
                        > have also compacted and repaired the database to no availe.
                        >
                        > As I said in the origional question this is really a weird problem.
                        >
                        > I'm starting to think it has something to do with the auto number.
                        >
                        > Steve
                        >
                        > "Michael (michka) Kaplan [MS]" <michkap@online .microsoft.com> wrote in
                        > message news:40c26708$1 @news.microsoft .com...[color=green]
                        > > And if you take out the function calls? You might want to humor me and[/color][/color]
                        try[color=blue][color=green]
                        > > it, just for giggles....
                        > >
                        > > Out of curiousity, what are the references?
                        > >
                        > > There is an interesting case where even if all the references are okay[/color]
                        > that[color=green]
                        > > a changed path of one of the references typelibs (DLL, OCX, or TLB) can
                        > > cause a partial reference break because the reference fixup does not[/color]
                        > happen[color=green]
                        > > properly when the ES is doing the fixup as opposed to VBA doing it[/color]
                        > directly.[color=green]
                        > > The workaround (if this is the problem) is to make sure that the[/color]
                        > references[color=green]
                        > > are all disambiguated and loaded prior to being used.
                        > >
                        > >
                        > > --
                        > > MichKa [MS]
                        > > NLS Collation/Locale/Keyboard Development
                        > > Globalization Infrastructure and Font Technologies
                        > >
                        > > This posting is provided "AS IS" with
                        > > no warranties, and confers no rights.
                        > >
                        > >
                        > > "Steve" <stevej@ufrmsa1 .uniforum.org.z a> wrote in message
                        > > news:c9tdrm$hh5 $2@ctb-nnrp2.saix.net. ..[color=darkred]
                        > > > I think you are correct, but the problem is I have checked out my[/color]
                        > > References[color=darkred]
                        > > > and everything seems to be in order.
                        > > >
                        > > > Steve
                        > > >
                        > > > "Michael (michka) Kaplan [MS]" <michkap@online .microsoft.com> wrote in
                        > > > message news:40c23215$1 @news.microsoft .com...
                        > > > > If I had to guess I would guess that it is complaining about one of[/color][/color]
                        > the[color=green][color=darkred]
                        > > > > function calls like Time().
                        > > > >
                        > > > >
                        > > > > --
                        > > > > MichKa [MS]
                        > > > > NLS Collation/Locale/Keyboard Development
                        > > > > Globalization Infrastructure and Font Technologies
                        > > > >
                        > > > > This posting is provided "AS IS" with
                        > > > > no warranties, and confers no rights.
                        > > > >
                        > > > >
                        > > > >
                        > > >
                        > > >[/color]
                        > >
                        > >[/color]
                        >
                        >[/color]


                        Comment

                        • Steve

                          #13
                          Re: Error 3220 - Function Is Not Available In Expression In Table Level Validation Expression

                          I think I've found the problem (and it looks like I caused it). I have both
                          office 97 ode tools and XP Developer on the same machine - according to
                          Microsoft this can cause a problem.

                          Thanks for all the assistance

                          Steve

                          "Steve" <stevej@ufrmsa1 .uniforum.org.z a> wrote in message
                          news:c9t1fi$gjv $1@ctb-nnrp2.saix.net. ..[color=blue]
                          > Hi
                          >
                          > I have a really weird problem and any assistance would be welcome.
                          >
                          > I have developed an app in Access 2002. The app runs perfectly on the
                          > development machine. I have packaged the app
                          > using the Microsoft XP Developer Packaging Wizard (Service Pack 1). The[/color]
                          1st[color=blue]
                          > 3 releases of the app ran perfectly on
                          > site.
                          >
                          > On Friday the 4th release of the app went out to a customer. The app[/color]
                          opened[color=blue]
                          > perfectly but on clicking OK on my login form
                          > I get the error : 3220 - The functiom is not available in expression in
                          > table level validation expression.
                          >
                          > I took the 2 main files one mde file containing the application and an mdb
                          > file containing the data which is linked into the
                          > mde file from the support directory on the installation CD and copied them
                          > to a machine which has Office XP Professional
                          > loaded (as I can not simulate the error on the box used for development).[/color]
                          I[color=blue]
                          > found that when I went into a table that when
                          > manually entering a record I got the same error, the weird part is neither
                          > the table nor the code populating the table
                          > has changed since the 1st release of the app (In fact it is code I use for[/color]
                          a[color=blue]
                          > table and module that I use in many other
                          > applications).
                          >
                          > The table layout is as follows :
                          >
                          > Key AutoNumber Primary Key
                          > UserName Text(15)[/color]
                          Mandatory[color=blue]
                          > No Default Value
                          > SecurityLevel Long Integer Mandatory
                          > Default Value 0
                          > DBChanged Text(20) Mandatory
                          > No Default Value
                          > RecordChanged Text(100) Mandatory
                          > No Default Value
                          > DBAction Text(100)[/color]
                          Mandatory[color=blue]
                          > No Default Value
                          > DateChanged Date/Time Mandatory
                          > Default Value Date()
                          > TimeChanged Date/Time Mandatory
                          > Default Value Time()
                          > TillNo Integer
                          > Default Value 0
                          >
                          >
                          > The code used to populate the table is as follows :
                          >
                          > Sub logchg(tbl As String, rec As Variant, action As String)
                          > Dim srec As String
                          > Dim logrs As Recordset
                          >
                          > srec = CStr(rec)
                          >
                          > Set logrs = db.OpenRecordse t("tblLog")
                          > logrs.AddNew
                          > logrs![UserName] = modGlobals.user
                          > logrs![SecurityLevel] = modGlobals.Secu rityLevel
                          > logrs![DbChanged] = tbl
                          > logrs![RecordChanged] = srec
                          > logrs![DBAction] = action
                          > logrs![TillNo] = modGlobals.Till No
                          > logrs.Update
                          > logrs.Close
                          > End Sub
                          >
                          > The call that causes the error is :
                          >
                          > Call modSecurity.log chg("N/A", "N/A", "LOGON")
                          >
                          > Can anyone explain why I get the error ?
                          >
                          > TIA
                          > Steve
                          >
                          >[/color]


                          Comment

                          • Steve

                            #14
                            Re: Error 3220 - Function Is Not Available In Expression In Table Level Validation Expression

                            OK I AM WRONG

                            References Used

                            C:\Program Files\Common Files\Microsoft Shared\VBA\VBA6 \vbe6.dll
                            C:\Program Files\Microsoft Office\Office10 \msacc.olb

                            C:\Program Files\ Common Files\Microsoft Shared\DAO\dao3 60.dll

                            C:\Windows\Syst em32\stdole2.tl b

                            C:\Program Files\Microsoft Office\Office10 \mscal.ocx

                            C:\Windows\Syst em32\Inetsrv\cn fgprts.ocx

                            C:\Windows\Syst em32\mscomm32.o cx

                            C:\Windows\Syst em32\smsmsg.ocx - This is an ocx I use to send and receive
                            SMS's



                            Steve

                            "Michael (michka) Kaplan [MS]" <michkap@online .microsoft.com> wrote in
                            message news:40c3273d$1 @news.microsoft .com...[color=blue]
                            > Your behavior exactly matches the circumstances I mention below. SO, if[/color]
                            you[color=blue]
                            > would like to solve the problem:
                            >
                            > 1) ASSUME YOU ARE WRONG.
                            >
                            > 2) List your exact references in your response to this message --[/color]
                            including[color=blue]
                            > the drive/dir location of each typelib (DLL, OCX, TLB)
                            >
                            > 3) Try what I asked you to do.
                            >
                            > All three steps are important for you to try if you truly want to solve[/color]
                            the[color=blue]
                            > problem. If, on the other hand, you want to keep spinning your wheels and
                            > having a problem, then proceed as you are doing now.
                            >
                            >
                            > --
                            > MichKa [MS]
                            > NLS Collation/Locale/Keyboard Development
                            > Globalization Infrastructure and Font Technologies
                            >
                            > This posting is provided "AS IS" with
                            > no warranties, and confers no rights.
                            >
                            >
                            > "Steve" <stevej@ufrmsa1 .uniforum.org.z a> wrote in message
                            > news:c9ulio$t8t $2@ctb-nnrp2.saix.net. ..[color=green]
                            > > The references are definately OK, I have checked versions against
                            > > installation versions and unregistered and reregisterd
                            > > them all.
                            > >
                            > > Remember I get the same error when manually inserting a value into the[/color]
                            > table[color=green]
                            > > i.e opening the table and typing in a record,
                            > > the first time I get the error, the second time the record is inserted.[/color][/color]
                            I[color=blue][color=green]
                            > > have also compacted and repaired the database to no availe.
                            > >
                            > > As I said in the origional question this is really a weird problem.
                            > >
                            > > I'm starting to think it has something to do with the auto number.
                            > >
                            > > Steve
                            > >
                            > > "Michael (michka) Kaplan [MS]" <michkap@online .microsoft.com> wrote in
                            > > message news:40c26708$1 @news.microsoft .com...[color=darkred]
                            > > > And if you take out the function calls? You might want to humor me and[/color][/color]
                            > try[color=green][color=darkred]
                            > > > it, just for giggles....
                            > > >
                            > > > Out of curiousity, what are the references?
                            > > >
                            > > > There is an interesting case where even if all the references are okay[/color]
                            > > that[color=darkred]
                            > > > a changed path of one of the references typelibs (DLL, OCX, or TLB)[/color][/color][/color]
                            can[color=blue][color=green][color=darkred]
                            > > > cause a partial reference break because the reference fixup does not[/color]
                            > > happen[color=darkred]
                            > > > properly when the ES is doing the fixup as opposed to VBA doing it[/color]
                            > > directly.[color=darkred]
                            > > > The workaround (if this is the problem) is to make sure that the[/color]
                            > > references[color=darkred]
                            > > > are all disambiguated and loaded prior to being used.
                            > > >
                            > > >
                            > > > --
                            > > > MichKa [MS]
                            > > > NLS Collation/Locale/Keyboard Development
                            > > > Globalization Infrastructure and Font Technologies
                            > > >
                            > > > This posting is provided "AS IS" with
                            > > > no warranties, and confers no rights.
                            > > >
                            > > >
                            > > > "Steve" <stevej@ufrmsa1 .uniforum.org.z a> wrote in message
                            > > > news:c9tdrm$hh5 $2@ctb-nnrp2.saix.net. ..
                            > > > > I think you are correct, but the problem is I have checked out my
                            > > > References
                            > > > > and everything seems to be in order.
                            > > > >
                            > > > > Steve
                            > > > >
                            > > > > "Michael (michka) Kaplan [MS]" <michkap@online .microsoft.com> wrote[/color][/color][/color]
                            in[color=blue][color=green][color=darkred]
                            > > > > message news:40c23215$1 @news.microsoft .com...
                            > > > > > If I had to guess I would guess that it is complaining about one[/color][/color][/color]
                            of[color=blue][color=green]
                            > > the[color=darkred]
                            > > > > > function calls like Time().
                            > > > > >
                            > > > > >
                            > > > > > --
                            > > > > > MichKa [MS]
                            > > > > > NLS Collation/Locale/Keyboard Development
                            > > > > > Globalization Infrastructure and Font Technologies
                            > > > > >
                            > > > > > This posting is provided "AS IS" with
                            > > > > > no warranties, and confers no rights.
                            > > > > >
                            > > > > >
                            > > > > >
                            > > > >
                            > > > >
                            > > >
                            > > >[/color]
                            > >
                            > >[/color]
                            >
                            >[/color]


                            Comment

                            • Michael \(michka\) Kaplan [MS]

                              #15
                              Re: Error 3220 - Function Is Not Available In Expression In Table Level Validation Expression

                              Ok, my guess is that at least one (and maybe several) of these libraries are
                              in a different location on the machines where the failure occurs. For some
                              reason, the Jet ES does not do the fixup properly in this case, so you need
                              to make sure you do the reference fixup in VBA first (by referencing these
                              objects in a procedure that gets called before that table is used).


                              --
                              MichKa [MS]
                              NLS Collation/Locale/Keyboard Development
                              Globalization Infrastructure and Font Technologies

                              This posting is provided "AS IS" with
                              no warranties, and confers no rights.


                              "Steve" <stevej@ufrmsa1 .uniforum.org.z a> wrote in message
                              news:ca1q74$6ok $1@ctb-nnrp2.saix.net. ..[color=blue]
                              > OK I AM WRONG
                              >
                              > References Used
                              >
                              > C:\Program Files\Common Files\Microsoft Shared\VBA\VBA6 \vbe6.dll
                              > C:\Program Files\Microsoft Office\Office10 \msacc.olb
                              >
                              > C:\Program Files\ Common Files\Microsoft Shared\DAO\dao3 60.dll
                              >
                              > C:\Windows\Syst em32\stdole2.tl b
                              >
                              > C:\Program Files\Microsoft Office\Office10 \mscal.ocx
                              >
                              > C:\Windows\Syst em32\Inetsrv\cn fgprts.ocx
                              >
                              > C:\Windows\Syst em32\mscomm32.o cx
                              >
                              > C:\Windows\Syst em32\smsmsg.ocx - This is an ocx I use to send and receive
                              > SMS's
                              >
                              >
                              >
                              > Steve
                              >
                              > "Michael (michka) Kaplan [MS]" <michkap@online .microsoft.com> wrote in
                              > message news:40c3273d$1 @news.microsoft .com...[color=green]
                              > > Your behavior exactly matches the circumstances I mention below. SO, if[/color]
                              > you[color=green]
                              > > would like to solve the problem:
                              > >
                              > > 1) ASSUME YOU ARE WRONG.
                              > >
                              > > 2) List your exact references in your response to this message --[/color]
                              > including[color=green]
                              > > the drive/dir location of each typelib (DLL, OCX, TLB)
                              > >
                              > > 3) Try what I asked you to do.
                              > >
                              > > All three steps are important for you to try if you truly want to solve[/color]
                              > the[color=green]
                              > > problem. If, on the other hand, you want to keep spinning your wheels[/color][/color]
                              and[color=blue][color=green]
                              > > having a problem, then proceed as you are doing now.
                              > >
                              > >
                              > > --
                              > > MichKa [MS]
                              > > NLS Collation/Locale/Keyboard Development
                              > > Globalization Infrastructure and Font Technologies
                              > >
                              > > This posting is provided "AS IS" with
                              > > no warranties, and confers no rights.
                              > >
                              > >
                              > > "Steve" <stevej@ufrmsa1 .uniforum.org.z a> wrote in message
                              > > news:c9ulio$t8t $2@ctb-nnrp2.saix.net. ..[color=darkred]
                              > > > The references are definately OK, I have checked versions against
                              > > > installation versions and unregistered and reregisterd
                              > > > them all.
                              > > >
                              > > > Remember I get the same error when manually inserting a value into the[/color]
                              > > table[color=darkred]
                              > > > i.e opening the table and typing in a record,
                              > > > the first time I get the error, the second time the record is[/color][/color][/color]
                              inserted.[color=blue]
                              > I[color=green][color=darkred]
                              > > > have also compacted and repaired the database to no availe.
                              > > >
                              > > > As I said in the origional question this is really a weird problem.
                              > > >
                              > > > I'm starting to think it has something to do with the auto number.
                              > > >
                              > > > Steve
                              > > >
                              > > > "Michael (michka) Kaplan [MS]" <michkap@online .microsoft.com> wrote in
                              > > > message news:40c26708$1 @news.microsoft .com...
                              > > > > And if you take out the function calls? You might want to humor me[/color][/color][/color]
                              and[color=blue][color=green]
                              > > try[color=darkred]
                              > > > > it, just for giggles....
                              > > > >
                              > > > > Out of curiousity, what are the references?
                              > > > >
                              > > > > There is an interesting case where even if all the references are[/color][/color][/color]
                              okay[color=blue][color=green][color=darkred]
                              > > > that
                              > > > > a changed path of one of the references typelibs (DLL, OCX, or TLB)[/color][/color]
                              > can[color=green][color=darkred]
                              > > > > cause a partial reference break because the reference fixup does not
                              > > > happen
                              > > > > properly when the ES is doing the fixup as opposed to VBA doing it
                              > > > directly.
                              > > > > The workaround (if this is the problem) is to make sure that the
                              > > > references
                              > > > > are all disambiguated and loaded prior to being used.
                              > > > >
                              > > > >
                              > > > > --
                              > > > > MichKa [MS]
                              > > > > NLS Collation/Locale/Keyboard Development
                              > > > > Globalization Infrastructure and Font Technologies
                              > > > >
                              > > > > This posting is provided "AS IS" with
                              > > > > no warranties, and confers no rights.
                              > > > >
                              > > > >
                              > > > > "Steve" <stevej@ufrmsa1 .uniforum.org.z a> wrote in message
                              > > > > news:c9tdrm$hh5 $2@ctb-nnrp2.saix.net. ..
                              > > > > > I think you are correct, but the problem is I have checked out my
                              > > > > References
                              > > > > > and everything seems to be in order.
                              > > > > >
                              > > > > > Steve
                              > > > > >
                              > > > > > "Michael (michka) Kaplan [MS]" <michkap@online .microsoft.com>[/color][/color][/color]
                              wrote[color=blue]
                              > in[color=green][color=darkred]
                              > > > > > message news:40c23215$1 @news.microsoft .com...
                              > > > > > > If I had to guess I would guess that it is complaining about one[/color][/color]
                              > of[color=green][color=darkred]
                              > > > the
                              > > > > > > function calls like Time().
                              > > > > > >
                              > > > > > >
                              > > > > > > --
                              > > > > > > MichKa [MS]
                              > > > > > > NLS Collation/Locale/Keyboard Development
                              > > > > > > Globalization Infrastructure and Font Technologies
                              > > > > > >
                              > > > > > > This posting is provided "AS IS" with
                              > > > > > > no warranties, and confers no rights.
                              > > > > > >
                              > > > > > >
                              > > > > > >
                              > > > > >
                              > > > > >
                              > > > >
                              > > > >
                              > > >
                              > > >[/color]
                              > >
                              > >[/color]
                              >
                              >[/color]


                              Comment

                              Working...