Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Aug 2002
    Location
    Brisbane, Queensland, Australia
    Posts
    387
    Thanks
    0
    Thanked 1 Time in 1 Post
    "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 Files\Common Files\Microsoft Shared\DAO\dao360.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?

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts
    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

  3. #3
    3 Star Lounger
    Join Date
    Aug 2002
    Location
    Brisbane, Queensland, Australia
    Posts
    387
    Thanks
    0
    Thanked 1 Time in 1 Post
    [quote name='patt' post='764288' date='09-Mar-2009 16:29']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[/quote]

    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.

  4. #4
    2 Star Lounger
    Join Date
    Jul 2002
    Location
    Sacramento, CA
    Posts
    193
    Thanks
    3
    Thanked 1 Time in 1 Post
    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.

  5. #5
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts
    [quote name='mcowen' post='793104' date='12-Sep-2009 11:21']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.[/quote]
    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.
    Wendell

Posting Permissions

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