Results 1 to 8 of 8
  1. #1
    drunkinmunki is offline Novice
    Windows Vista Access 2007
    Join Date
    Dec 2010
    Posts
    9

    Error in Runtime Only

    Hi,



    bit of a newbie but was hoping someone could explain why when i run my database in access 2007 i do not get any errors. when i run it in access 2007 RT i get errors and it crashes and shuts down. I don't understand how you can fix an error if their is no warning an error is occurring?

    cheers for any tips.

    Col.

  2. #2
    HiTechCoach's Avatar
    HiTechCoach is offline MS MVP - Access Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jul 2010
    Location
    Oklahoma, USA
    Posts
    702
    I will assume that you have already split your database. Is that correct?

    Are you compiling your front end into an .accde before deploying to the runtime?

    Are you adding error handling code to all your VBA code procedures?

  3. #3
    drunkinmunki is offline Novice
    Windows Vista Access 2007
    Join Date
    Dec 2010
    Posts
    9
    Hi,

    Database not split into a front end and back end. i do intend to do this at some stage nearer completion but not yet.

    I do compile the in code in vba before i run the package deployment and fix any errors that come up before running the package deployment.

    Im not sure what a .accde is I know a .accdb is the standard database file time and Runtime is .accdr? does a .accde happen automatically when you click compile in vba?

    I don’t fully understand error handling I add it in when I see a problem eg if an error occurs go to a particular line but I have looked in some example where you can set it to work to specific codes which access throws up when are writing the code. I am going to look at that in more depth as up to know I have just been writing things for myself but now more people in the office are starting to use it I need to write code with error handling in mind more. I don’t know how this will help me tho as no error comes up in the design stage its only when I deploy, install then run it in Runtime the error comes up. Thinking about it it might be a isnull problem but it would only occur if the value was null which it isnt always. I just remember I fixed some code last night that was throwing up errors but due to a field being empty. So how do you build code for that? Do you have to do if isnull = true on every line of code when referring to a field?

    Cheers,

    Col

  4. #4
    HiTechCoach's Avatar
    HiTechCoach is offline MS MVP - Access Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jul 2010
    Location
    Oklahoma, USA
    Posts
    702
    In the Access Runtime any unhandled errors will cause Access to shutdown.

    When deploying to a Access Runtime target you must also be sure that you do not have any missing VBA References. A missing reference will cause lots of VBA errors which will cause the Access Runtime to shut down.

    I deploy all my front ends with the Access Runtime. Proper Error Handling is is very important.

    I don’t know how this will help me tho as no error comes up in the design stage its only when I deploy, install then run it in Runtime the error comes up. Thinking about it it might be a isnull problem but it would only occur if the value was null which it isnt always. I just remember I fixed some code last night that was throwing up errors but due to a field being empty. So how do you build code for that? Do you have to do if isnull = true on every line of code when referring to a field?
    I find that the most common use for Error Handling is the handling of bad data. By using data validation rules in the data entry forms you can eliminate a lot of the bad data that you have to handle later.

    When doing my testing for error handling I link to a different back end with data that I know will cause lots of errors. Another benefit of splitting early on in development. It allows for a lot better testing along the way.


    Have you every deployed a split database before?

    If not, then I would urge you to do it now. There will be something you will need to learn how to handle. I actually find that splitting a database from the start has many benefits to help during the entire development process. That is why I start every database split.


    These links might help:

    Access 2007 runtime deployment - FAQs

    Splitting your Access database into application and data

  5. #5
    drunkinmunki is offline Novice
    Windows Vista Access 2007
    Join Date
    Dec 2010
    Posts
    9
    Yes I have split a database. Did a little contacts db for my office as a bit of a tester and it worked fine. I didn’t know the file path to the back end when I was working on it away from the office so used some code I found to allow the user to pick it on first load. It works fine but every time the database opens it asks you if you wish to confirm the path. I only really wanted it to do this if BE table not found. I am assuming you can do it programmatically but haven’t found the right code yet. My knowledge of vba is from autocad mostly with a little bit of excel and then VB6 which I learned back in college years ago. So getting to grips with the Access code and also Access itself is a bit of a learning curve.

    Actually regarding back end databases I am working on an electronic purchase order system using northwind 2007 as an example. And have been looking problem with the db size and read the limit is 2 GB. If I split the db into several different BE db will that allow an unlimited overall db. Obviously the BE db will need archiving at some point but say I have an employee table. A supplier table, project table and then two purchase order table one for details and one for the actual bits ordered. To me this is five BE db so this would allow the overall size to be at least 10 GB before I would really need to archive old records? Is this correct or I do not understand the concept fully?

    The db that would be an issue would be the project db and also the Purchase Order db as I intend to attach documents to it. I think I will limit to PDFS as .dwgs can be fairly big and a .pdf is normally well under an mb if you are only taking a couple of pages worth.

    Thansk for the links to will have a read of them before i go any further.

    Cheers,
    Colin

  6. #6
    drunkinmunki is offline Novice
    Windows Vista Access 2007
    Join Date
    Dec 2010
    Posts
    9
    How to make sure you do not have missing references? On my computer i selected outlook library 12.0 does this then get included when i package it in runtime? I ask cos when i loaded it on another computer it said i was missing somthing so my program might not run correctly and the thing i was missing had "OUTL" in the title with can remember the exact name but it must have been because of the references not being ticked but how can you do this in runtime?

    cheers,

    Col.

    PS sorry for picking you brain so much!

  7. #7
    HiTechCoach's Avatar
    HiTechCoach is offline MS MVP - Access Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jul 2010
    Location
    Oklahoma, USA
    Posts
    702
    Quote Originally Posted by drunkinmunki View Post
    Yes I have split a database. Did a little contacts db for my office as a bit of a tester and it worked fine. I didn’t know the file path to the back end when I was working on it away from the office so used some code I found to allow the user to pick it on first load. It works fine but every time the database opens it asks you if you wish to confirm the path. I only really wanted it to do this if BE table not found. I am assuming you can do it programmatically but haven’t found the right code yet.
    That is good. You already have some experience with linking and relinking tables.

    I do hanlde all the back end management programmatically.

    [QUOTE=drunkinmunki;41738]
    Actually regarding back end databases I am working on an electronic purchase order system using northwind 2007 as an example. And have been looking problem with the db size and read the limit is 2 GB. If I split the db into several different BE db will that allow an unlimited overall db. Obviously the BE db will need archiving at some point but say I have an employee table. A supplier table, project table and then two purchase order table one for details and one for the actual bits ordered. To me this is five BE db so this would allow the overall size to be at least 10 GB before I would really need to archive old records? Is this correct or I do not understand the concept fully?
    [quote]
    It is always best to keep all the tables in a single database. This way you have the database engine enforce Referential Integrity. When you start using multiple back end to hold related data it takes a lot of extra coding to manually enforce Referential Integrity.

    Are you already hitting the 2 gig limit? What is casing all the bloat?

    I have a full blown Accounting system in Access that includes a document management system. Some clients have over 100,000 invoice with many line items per invoice. Even with all the customer, payment, PO data etc, the single back end it less than 500 meg.

    If you really are hitting the 2 gig limit or will be soon then you really need to switch to a SQL back end.


    Quote Originally Posted by drunkinmunki View Post
    The db that would be an issue would be the project db and also the Purchase Order db as I intend to attach documents to it. I think I will limit to PDFS as .dwgs can be fairly big and a .pdf is normally well under an mb if you are only taking a couple of pages worth.
    I would use a single back end for all your tables for your project db, Purchase Order db, Sales etc. that are many reason for this.

    About attaching documents. I do it in most of my applications. I have several client with over 200 gig of linked documents. Some files as larger as 2 gig. That is because I would never store the file in the database. It is just to much extra work coding, database bloat, data corruption, also ... I could go on but you should get this idea.

    I have created some examples of how I do it. Here is one: Document Links

  8. #8
    HiTechCoach's Avatar
    HiTechCoach is offline MS MVP - Access Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jul 2010
    Location
    Oklahoma, USA
    Posts
    702
    Quote Originally Posted by drunkinmunki View Post
    How to make sure you do not have missing references?
    Good development procedures.

    This includes:
    1) A split database.
    2) A test enviornment (I use Virtual PC)
    3) A network.
    4) Version control.

    and lots of testing, testing, and more testing.

    Quote Originally Posted by drunkinmunki View Post
    On my computer i selected outlook library 12.0 does this then get included when i package it in runtime? I ask cos when i loaded it on another computer it said i was missing somthing so my program might not run correctly and the thing i was missing had "OUTL" in the title with can remember the exact name but it must have been because of the references not being ticked but how can you do this in runtime?
    When deploying with the Access Runtime it does not invluce the license for any other Office products. So it is not possible to distrute any of the other Office prodcts with eh Access runtome. You must puchase those licenses for each machine separately.

    If you are going to use any Office Atuomation with then you have a lot of extra work to do. In your code it is best to test to see if the software is installed before executing. Switching all your code to use late binding, etc. I always do it this way every with the Full verion of Access.

    Do you already have a way to handle version control and front end updates? Note: Another reason to split your database from the start.

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

Similar Threads

  1. Runtime error not functioning A2007
    By gg80 in forum Programming
    Replies: 11
    Last Post: 09-04-2010, 01:24 PM
  2. runtime error 3219
    By Rider570 in forum Programming
    Replies: 3
    Last Post: 07-07-2010, 09:12 PM
  3. runtime error 2448
    By ds_8805 in forum Forms
    Replies: 3
    Last Post: 04-14-2010, 07:32 PM
  4. Help With Runtime Error 4248
    By KLahvic in forum Programming
    Replies: 1
    Last Post: 04-09-2010, 07:47 AM
  5. Runtime 3075 error
    By whm1 in forum Programming
    Replies: 4
    Last Post: 03-24-2010, 02:50 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