Results 1 to 10 of 10
  1. #1
    AccessN00b is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2012
    Posts
    11

    Help Solving Runtime Error Only In Compiled Version

    Greetings. My apologies for starting out my posting history here with a cry for help but I'm just getting started with MS Access and I think I've over reached myself. I created a form that can update a table with new entries and I was really pleased with myself when I got it to work. So next I used Access Runtime to turn it into an installed package and then installed it on my computer. But I found that the installed version didn't work. When I clicked the update button that previously worked in development I received an error message that says:
    "Execution of this application has stopped due to a run-time error. This application can't continue and will be shut down".

    All indications are that this is the line it doesn't like:


    CurrentDb.Execute "Insert Into table(System, Type, Error, Response, Purge) Values ('" & Me.updSystem & "', '" & Me.updType & "', '" & Me.updError & "', '" & Me.updAction & "', '" & check & "')"

    If anyone can guide this rookie in the right direction I'd be grateful. Thanks in advance.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I'd start with error trapping so you'll at least get the actual error number/description:

    http://www.baldyweb.com/ErrorTrap.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    AccessN00b is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2012
    Posts
    11
    Quote Originally Posted by pbaldy View Post
    I'd start with error trapping so you'll at least get the actual error number/description:

    http://www.baldyweb.com/ErrorTrap.htm
    Thanks Paul. With your added code the message now reads "Operation must use an updateable query". Don't know what that means and I find it confusing that this logic works in MS Access but not as an installed product.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    That is odd. Is the runtime version linked to a read only back end perhaps?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    AccessN00b is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2012
    Posts
    11
    Quote Originally Posted by pbaldy View Post
    That is odd. Is the runtime version linked to a read only back end perhaps?
    If it is it wasn't by my design. I did notice however that the first time I ran the installed version a message appeared across the top saying "This database has been opened read-only. You can only change data in linked tables. To make design changes, save a copy of the database." I assumed that was standard since I didn't knowlingly set it up that way and I figured I was okay because it did say that I could still make changes to linked tables which I assumed meant the table that was part of this project.

  6. #6
    AccessN00b is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2012
    Posts
    11
    Well the good news is that I solved the error problem. I went back and looked at the install wizard settings and noticed that for the root install folder I picked the Program folder which I preferred but I noticed that next to that option were the words "read-only on Vista". Now I'm not using Vista but I figured "what the heck I'll change it anyways" so I set the root install folder to Desktop instead and voila problem solved.

    But the bad news is that this exposed a new problem that, like the previous one, only occurs in the installed version: any new record that is added to the table via the form isn't viewable in that form until I close the entire program and reopen it. I'm guessing that, somehow, after adding a new record to a table I have to refresh the table maybe?

  7. #7
    AccessN00b is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2012
    Posts
    11
    Quote Originally Posted by AccessN00b View Post
    Well the good news is that I solved the error problem. I went back and looked at the install wizard settings and noticed that for the root install folder I picked the Program folder which I preferred but I noticed that next to that option were the words "read-only on Vista". Now I'm not using Vista but I figured "what the heck I'll change it anyways" so I set the root install folder to Desktop instead and voila problem solved.

    But the bad news is that this exposed a new problem that, like the previous one, only occurs in the installed version: any new record that is added to the table via the form isn't viewable in that form until I close the entire program and reopen it. I'm guessing that, somehow, after adding a new record to a table I have to refresh the table maybe?
    Ah! Figured it out. Needed an Me.Requery call after the update ran.

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Sorry for the delay, I went out with my wife last night. Glad you got it sorted out.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  9. #9
    AccessN00b is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2012
    Posts
    11
    Quote Originally Posted by pbaldy View Post
    Sorry for the delay, I went out with my wife last night. Glad you got it sorted out.
    You keeping accompanying women places and spending time away from computers and you'll give programmers a bad name.

  10. #10
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    LOL! I had my iPhone with me; does that count?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 3
    Last Post: 09-09-2015, 03:11 PM
  2. Replies: 4
    Last Post: 05-30-2012, 07:00 AM
  3. Replies: 1
    Last Post: 02-10-2012, 05:53 PM
  4. Crashing when compiled
    By wthoffman in forum Access
    Replies: 1
    Last Post: 04-20-2011, 10:27 AM
  5. Help in Solving Warranty Period in Access
    By vdanelia in forum Access
    Replies: 4
    Last Post: 01-29-2011, 04:28 PM

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