• Error using 2007 runtime

    Author
    Topic
    #458134

    “3320 function is not available in expressions in table-level validation expression” is the error and it is occurring on the line –
    .addnew – in the following context
    strSQL = “SELECT * FROM tblRunner WHERE Race_ID = “”” & strRaceID & “”” AND Runner_Number = ” & intRunnerNumber
    Set rstRunner = db.OpenRecordset(strSQL, dbOpenDynaset)
    With rstRunner
    strAction = “Test For EOF.”
    If .EOF Then
    strAction = “Add Records”
    .AddNew
    strAction = “Set Race ID”

    I used the strAction vairable in the error message to determine the exact line causing the error.
    The user’s Vista machine does not have Access installed, just the 2007 runtime. it does have C:Program FilesCommon FilesMicrosoft SharedDAOdao360.dll.
    I have tested on one of my machines with the runtime and the exact same backend database using the same front end although this test PC does have Access 2002 installed. and it did not error.
    There is no validation in the tables and neither field is unique. The application is written in 2002 then packaged using 2007.

    Any ideas?

    Viewing 1 reply thread
    Author
    Replies
    • #1150860

      I dont know if this will help, but is strRaceID numeric?
      If so then change:
      strSQL = “SELECT * FROM tblRunner WHERE Race_ID = “”” & strRaceID & “”” AND Runner_Number = ” & intRunnerNumber

      to
      strSQL = “SELECT * FROM tblRunner WHERE Race_ID = ” & strRaceID & ” AND Runner_Number = ” & intRunnerNumber

      • #1150861

        I dont know if this will help, but is strRaceID numeric?
        If so then change:
        strSQL = “SELECT * FROM tblRunner WHERE Race_ID = “”” & strRaceID & “”” AND Runner_Number = ” & intRunnerNumber

        to
        strSQL = “SELECT * FROM tblRunner WHERE Race_ID = ” & strRaceID & ” AND Runner_Number = ” & intRunnerNumber

        Nope it’s a string.

        The problem is caused by the date fields in the tblRunner table. they use a default of Date().

        Microsoft’s implementation of dates is inconsistent in Access where quite often the wheels fall off when you are not using the US m/d/Y format.

        On some Windows systems the default for date fields in tables and forms will not work using d/m/y format.

        Hard to run this one down but that’s it.

    • #1177121

      I too am getting this error when I try to run a working 2007 accde on a machine with only Access2007Runtime installed. Nearly all the discussions I’ve read on this error seem to point to missing dll’s. In my case looking at the context of the several errors that pop-up they all seem to be related to working with record sets. I’ve compared the References between the working and RunTime machine and they are all there and valid on the Runtime. I also compared the version #’s of the references on each machine. They are either the same or the Runtime has slightly newer versions (but only at the build level, the first two positions of the version numbers are the same). I’m guessing there must be some additional required Access files, any thoughts on how to track them down. I have not yet downloaded and tried the Packaging Wizard to see if that resolves the problem, mostly because I’ve never used it and the application has a very limited distribution.

      • #1177155

        I too am getting this error when I try to run a working 2007 accde on a machine with only Access2007Runtime installed. Nearly all the discussions I’ve read on this error seem to point to missing dll’s. In my case looking at the context of the several errors that pop-up they all seem to be related to working with record sets. I’ve compared the References between the working and RunTime machine and they are all there and valid on the Runtime. I also compared the version #’s of the references on each machine. They are either the same or the Runtime has slightly newer versions (but only at the build level, the first two positions of the version numbers are the same). I’m guessing there must be some additional required Access files, any thoughts on how to track them down. I have not yet downloaded and tried the Packaging Wizard to see if that resolves the problem, mostly because I’ve never used it and the application has a very limited distribution.

        Exactly where are you getting the error? Is it when you are manipulating tables with DAO or ADO, or are you running simple queries or what? And do you have any table validation rules in place. I presume in this case you are using date fields in US format, so that aspect should not be an issue. And I doubt that you will have any better results if you use the Packaging Wizard. Give us some details and we will see if we can at least point you in the right direction.

    Viewing 1 reply thread
    Reply To: Error using 2007 runtime

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: