Results 1 to 12 of 12
  1. #1
    FL0XN0X is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jan 2018
    Location
    Belgium
    Posts
    84

    MS Access Runtime: Form does not react on clicked buttond

    Hi,

    I have saved my DB as ACCDE file and set a form as default form to open. However, when opening the DB via Access Runtime, the default Form is opened but none of the buttons on the default form interact when clicked. The DB is working perfectly in full Acccess version, but not in Runtime. Can someone please explain the process to have a db working using Runtime. PS: db is split into backend DB (tables) and front-end (forms/queries/reports)
    Thank you in advance.
    Kind regards,
    Bart

  2. #2
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,130
    There is no special process.
    If the ACCDB was compiled and error free and the ACCDE was created in the same version and same bitness as the Runtime, it should just work.
    Is the ACCDE file in a trusted location?
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  3. #3
    FL0XN0X is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jan 2018
    Location
    Belgium
    Posts
    84
    What do you mean by “ if it was compiled error free”? Do I need to compile the db before it can be used with access runtime? I now just created the accde file by Save As , no explicit Compiling Am I missing something?

  4. #4
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,130
    You should always compile before creating an ACCDE file to ensure it is error free.
    That's true whether or not you are going to use Runtime.

    Having said that, Access may not let you create an ACCDE if there are issues.

    EDIT This may not be relevant to you but have a look at this article about an Access bug with ACCDE and Runtime
    https://www.devhut.net/2017/11/07/ac...ccess-runtime/
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  5. #5
    FL0XN0X is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jan 2018
    Location
    Belgium
    Posts
    84
    How to compile then?

  6. #6
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,130
    In the usual way
    Open the VBE, Debug...Compile.
    Fix any errors that are shown.
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  7. #7
    FL0XN0X is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jan 2018
    Location
    Belgium
    Posts
    84
    Hi,

    I think I am not on the same page.

    Thus,

    I have got an Access DB, which is an accdb file.
    Then I splitted the accdb file, using the Database Tools menu in MS Access. Then I followed the Wizard, which resulted in 2 accdb files: The first accdb file contains all front-end related topics (Forms, Reports, Queries, ...) and the second accdb file contains data only (Tables).

    Now, those 2 files, I now want to use on a computer that only has MS Access Runtime installed. What is the step-by-step approach for this?

    (You mention "open the VBE, Debug, Compile..." but this is done where?? In MS Access? ).

    Thus question is, the 2 files, which work fine in MS Access Full version, how to use them using Ms Access Runtime?

  8. #8
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,130
    You should have been compiling your Access database regularly throughout the development process.
    As it seems you haven't done so, check the following in the front end database (ACCDB version)

    Open the VBE Editor, click Tools ... Options & tick Require Variable Declaration

    Also in the VBE, click Tools ...References & ensure no references are marked as MISSING.
    If any are MISSING, fix them.

    Still in the VBE, make sure you have these two lines at the top of EACH code module
    Option Compare Database
    Option Explicit

    Doing this will force Access to check for undeclared variables that would otherwise cause code errors
    Still in the VBE, click Debug...Compile

    Access will now go through each code module and highlight any undeclared variables.
    If it finds any, add Dim statements for each e.g. Dim strSearch As String
    Repeat several times if necessary until the compile menu item is 'greyed out' (disabled)
    The project is now fully compiled

    Now I recommend you make a backup then do a compact and repair.
    Now you can make your FE database into an ACCDE again.

    If the BE database just contains tables, there will be no code so you don't need to compile it.
    Worth compacting it however

    The ACCDE file should now work with both full Access & runtime version of Access that is the SAME version that the ACCDE file was made in
    e.g. 32-bit A2010 or 64-bit A2016
    It MAY not work in other versions due to code differences or reference issues that can't be handled by runtime versions

    If still unclear to you, have a look at e.g. FMS website which has lots of useful guidance
    Good luck

    For future databases, tick Require Variable Declaration from the start.
    Access will then add Option Explicit automatically in each code module so you can prevent compile errors building up
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  9. #9
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,372
    AFAIK, Access automatically compiles when you create the mde or accde. If it wont' compile, the process fails. I'm not saying one doesn't need to compile first, though.
    You were probably on the right track when you asked if the runtime version was in a trusted location.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  10. #10
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,130
    Hi micron
    Yes I also believe that to be the case but the OP seemed completely unaware of the purpose of compiling and how to perform a compile.
    That's why I spelt it out in detail. Not just for the matter at hand

    I suggested a non trusted location as the issue as that would prevent code running so the button clicks wouldn't work.
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  11. #11
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,372
    I suggested a non trusted location as the issue as that would prevent code running so the button clicks wouldn't work.
    Credit given where due

    You were probably on the right track when you asked if the runtime version was in a trusted location.

  12. #12
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,130
    As an experiment, I just tested making an ACCDE file from:
    a) a partly compiled ACCDB to which I made a deliberate minor error - changed a Parent. reference to Parents.
    As expected, the ACCDE file was not created
    b) an ACCDB file with no compile errors which I had just fully decompiled.
    This worked - interestingly the original ACCDB file remained decompiled

    However IMO my original advice remains valid - always compile before trying to create an ACCDE
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

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

Similar Threads

  1. Replies: 9
    Last Post: 04-04-2017, 05:38 AM
  2. Replies: 4
    Last Post: 01-11-2016, 08:50 AM
  3. Replies: 2
    Last Post: 08-22-2015, 11:26 AM
  4. Replies: 4
    Last Post: 11-26-2013, 02:35 PM
  5. Replies: 1
    Last Post: 11-09-2010, 03:02 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