Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    Marky000 is offline Novice
    Windows 7 64bit Access 2002
    Join Date
    Jul 2021
    Posts
    10

    Question Access 97 programming question

    I have a client running a very old program using Office 97 databases (.mdb) and I believe some vb script. The client doesn't want to buy other software. It actually runs fine on Win 10 but its email feature doesn't work with Office programs newer than 2010.



    At this point, I have got Access 1997 running on my PC and can open the database file and see the various tables etc. However, the guy who designed the system made use of two mdb files. One he called the mdb data file and the other is the mdb program file. The user runs the program file which in turns reads and writes to/from the data file. The data file as I said can be analysed in Access. However, when the program file is opened in Access, it runs the software program. I haven't found a way thus far to analyse the program file.

    I have tried viewing the program file (mdb) in programs such as Notepad++. It mentions that the file is a Standard Jet DB. There is some readable code amongst what is mostly garbage text. This program file (mdb) doesnt hold any data, it is the interface that connects to the database file.

    I realise Access 97 is so old but hoping someone might have an idea how this mdb progam file was written. I assume back then it was common to combine vb script with an mdb file?

    The end game here is to try and find the code that is responsible for emailing invoices via the default email client. As I said, as of now it only works with Outlook 2010 or earlier. For later versions, an error occurs and the email isnt received by the email client program. Error msg = "can't open the mail session, check your mail application to make sure it`s working properly ". I think it uses the msmapi32.dll file. I realise that finding the code doesnt guarantee a fix but it would be nice to find it nonetheless. I am not finding anything of value in Notepad++ and I haven't found a way to analyse it in Access 97.

    Any ideas would be appreciated.

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    1,195
    Sounds like a split DB?, but the BE should be names DBName_be.mdb?
    Are you sure the FE is not an mde?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?search_query=debug+access+vba



  3. #3
    isladogs's Avatar
    isladogs is offline Very idle programmer
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,020
    Try holding the shift key down as you open the program file with A97. This will prevent any code running.
    Next press Alt+F11 to open the Visual Basic Editor so you can examine the code used....unless of course it has been compiled as an MDE file

    Whilst the VBE is open, click Tools...References and check whether any references are marked as MISSING
    Colin (Mendip Data Systems): Website, email
    Try again. Fail again. Fail better.
    A
    sking for help isn't giving up. Its refusing to give up.

  4. #4
    Marky000 is offline Novice
    Windows 7 64bit Access 2002
    Join Date
    Jul 2021
    Posts
    10
    Thanks guys.

    Holding the shift key did work. I can now see the tables etc of the program mdb file. However Alt + F11 did not do anything.

    I have seen something under modules called InvoiceEmail but all options such as run, design and new are greyed out.

    As for BE and FE, I assume the frontend is the program mdb file. Both files (FE and BE) end in the .mdb extension.

  5. #5
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    9,460
    Make sure of the extensions of your file names. Perhaps you are assuming mdb but in fact either both the be (back end with tables) and fe (front end with every thing else) are not mdb but in fact are mde*. The situation you describe suggests the fe is an mde. If that is the case, you cannot modify anything in it and cannot even view code. You would need the original mdb fe file.

    *Note - typically only the fe would be an mde file (or accde in later versions).
    Last edited by Micron; 07-30-2021 at 08:22 AM. Reason: clarification
    - "doesn't work" doesn't help. Implement changes in copies of your database.
    Iím telling everyone it's good to eat dried grapes. Itís all about raisin awareness.

  6. #6
    Marky000 is offline Novice
    Windows 7 64bit Access 2002
    Join Date
    Jul 2021
    Posts
    10
    Googling said I can use > Tools > Analyze > Documenter and then select the module I want to read the code from. When I select the InvoiceEmail module, it generates an error = "That command isn't available in an MDE database". So I guess it is an MDE file afterall?

    I should also point out that the FE file does also have tables. The BE file has similar tables listed but more tables in total. The main difference is that the BE file has very few modules and macros.

  7. #7
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    9,460
    What you're likely looking at in the fe is the icons for linked tables (IIRC there is an arrow in the icon), which would mean they are not tables but only representations. So yes, you have an mde and the code is not viewable let alone editable. File explorer would tell you that? Anyway, you need the "master" mdb version of that file to make any changes or to view code so better start hunting for it!

    Some fe's have maybe one or two actual tables but they are meant to be specific to a user. They should not contain any 'production' data. At least not usually.
    Last edited by Micron; 07-30-2021 at 08:43 AM. Reason: added info
    - "doesn't work" doesn't help. Implement changes in copies of your database.
    Iím telling everyone it's good to eat dried grapes. Itís all about raisin awareness.

  8. #8
    Marky000 is offline Novice
    Windows 7 64bit Access 2002
    Join Date
    Jul 2021
    Posts
    10
    When I try the same process with the BE file (i.e. to analyze a module), I get an error of "You don't have permission to read ....". So, this seems to confirm the BE is an mdb file.

    And yes you are correct, the FE file has an arrow added to the icons for the tables.

    I guess I will have to reach out to the original programmer. Thanks very much for your help. I have been wanting to get to the bottom of this problem for years Finally decided to have a closer look at it.

    I might have to do some reading on MDE files as I don't really understand how the master mdb file creates the mde file. Also, am I right in assuming Alt + F11 didn't work because it is an MDE file? Initially, I thought that Alt + F11 was added to more recent versions of office. Alt + F11 didn't work for either the FE or the BE file.

  9. #9
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    9,460
    In much later versions you choose 'make accde file' from Ribbon > File > Save As. Cannot recall how from 97. Doing this basically removes all code by compiling it into machine? language. Could try ctl+G instead of alt+F11 if your keyboard requires holding down a function key as does mine. Without doing that, F keys are not invoked as the old function keys were because they control other factors such as screen brightness on my laptop. I would have to hold func+alt+F11. Won't do you much good anyway as you won't be able to read any code if you do get it open.
    - "doesn't work" doesn't help. Implement changes in copies of your database.
    Iím telling everyone it's good to eat dried grapes. Itís all about raisin awareness.

  10. #10
    Marky000 is offline Novice
    Windows 7 64bit Access 2002
    Join Date
    Jul 2021
    Posts
    10
    I just tried it. In Office 97, >Tools > Database Utilities > Make MDE File.

    Looks like ctrl+g did work. It brings up a Debug Window (blank of course).

  11. #11
    Marky000 is offline Novice
    Windows 7 64bit Access 2002
    Join Date
    Jul 2021
    Posts
    10
    Do you think that the same master mdb file was the source of both the FE and BE? Has to be since it is a split database?

    The fact I don't have permissions to view (design) the modules in the BE file seems to be further proof of this.

  12. #12
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    9,460
    Some confusing things there. The be has modules? It should not.
    If the fe contains links to tables (the table icon with the arrow) it is split. That is your confirmation. Mouse over the table icon and its path should pop up, assuming you don't already know that.
    Cannot say if one 'unsplit' db file is the master or not but I doubt it. The entire db could have been contained in one db as it was being developed and then split but it is not my way. If the un-split db becomes corrupted to the point of no recovery, you lose all the data and the objects instead of just the part with all the objects. More likely that the master is what was used to make the mde and there would be one or more backup copies of the be data.

    Methinks you will have to use File Explorer to look for the master file or consult with the prior db admin.
    - "doesn't work" doesn't help. Implement changes in copies of your database.
    Iím telling everyone it's good to eat dried grapes. Itís all about raisin awareness.

  13. #13
    Marky000 is offline Novice
    Windows 7 64bit Access 2002
    Join Date
    Jul 2021
    Posts
    10
    It only has 2 modules. One for updating the program and the other being the logo of the original programmer.

    Seems Office 97 doesn't show the path of where the links point to but the table icons with arrows exist nonetheless.

    You are most likely correct about the BE/FE. I think you are suggesting it might have been split from early on and not split from a completed master mdb file. Makes sense.

    When moving around in the BE file, I have seen a few read-only messages popup. This is what made me wonder if the BE was also sourced from a master file.

  14. #14
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    9,460
    Seems Office 97 doesn't show the path of where the links point to but the table icons with arrows exist nonetheless.
    Except for a job I did about 2 years ago, it's been ages since I worked in 97. I keep an old laptop around because it still has 97 on it and would have to dig it out to remember how to know the path if mousing over the table icons won't do it. One way would be to see if you can invoke the Linked Table Manager on an mde - I don't see why not. That should show you the be location for all of the tables. Assuming that after getting in to the vb editor (vbe) you can still use the immediate window in mde files, then you can type (including the ?)

    Code:
    ?currentdb.TableDefs("InsertTableNameHere").connect
    and hit return. It should show you the path of the table name you put inside those quotes. Note that this may only be valid for that table - it is not certain that all the links are pointing to the same be. Note that you may have to open the immediate window (check View menu for the option) if it is not already there.
    - "doesn't work" doesn't help. Implement changes in copies of your database.
    Iím telling everyone it's good to eat dried grapes. Itís all about raisin awareness.

  15. #15
    isladogs's Avatar
    isladogs is offline Very idle programmer
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,020
    I have A97 on a VM so I've just checked to remind myself.

    In A97, the linked table path doesn't appear when you hover over a linked table.
    Nor can you get to it using the right click context menu

    To view/edit the links, open the linked table manager which is somewhat hidden away on the Tools menu

    Click image for larger version. 

Name:	Capture1.PNG 
Views:	12 
Size:	27.0 KB 
ID:	45877Click image for larger version. 

Name:	Capture2.PNG 
Views:	12 
Size:	25.3 KB 
ID:	45878

    Unfortunately, it isn't possible to expand or scroll the LTM to see the full path of the linked table if it doesn't fit in the window.
    However there is another way of getting the info using the system table MSysObjects.
    To view that, you need to make system tables visible: Tools...Options ...View tab & tick System Objects.
    There are a lot of fields you can ignore.
    All you really need is the Name & the the path to the linked database which is in the Database column.
    The Connect column is for e.g. SQL Server linked tables

    However a better way is to make a query on that system table
    Create a new query in design view then change to SQL view & paste in the code below

    Code:
    SELECT MSysObjects.Name, MSysObjects.Database, MSysObjects.Connect FROM MSysObjects
    WHERE (((MSysObjects.Type)=4 Or (MSysObjects.Type)=6));
    The result will be something like this:
    Click image for larger version. 

Name:	Capture4.PNG 
Views:	12 
Size:	11.1 KB 
ID:	45879

    Hope that helps.

    If you want me to take a look at the FE & BE, please make a copy, remove any confidential data, compact & zip
    Last edited by isladogs; 07-31-2021 at 03:45 PM.
    Colin (Mendip Data Systems): Website, email
    Try again. Fail again. Fail better.
    A
    sking for help isn't giving up. Its refusing to give up.

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Combo Box After Update Programming Question
    By Kaloyanides in forum Programming
    Replies: 2
    Last Post: 12-26-2020, 10:45 AM
  2. Replies: 4
    Last Post: 05-29-2015, 09:36 AM
  3. Access 2010 database programming question
    By napiedra in forum Programming
    Replies: 17
    Last Post: 11-09-2013, 12:00 AM
  4. Simple Programming Question
    By EvanRosenlieb in forum Programming
    Replies: 5
    Last Post: 11-18-2011, 04:31 PM
  5. Basic report programming question.
    By sepoto in forum Programming
    Replies: 1
    Last Post: 04-06-2011, 07:45 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