Train-Sim.Com
Microsoft Train Simulator

Activities Tracking Database-Utility

Activities Tracking Database-Utility – image 1

Notice to all visitors and members of the Train-Sim.Com message forums:
If you plan on using a signature banner in your posts, we would like to remind you that there is a maximum size for banners. That maximum is 450 pixels wide by 120 pixels high, and not to exceed 25k. Your compliance is appreciated. FORUM RULES Problems? There are two common reasons for problems with logging in and posting messages. The first is that you are running a firewall that prevents your messages from being sent to the server. The other is that you have cookies disabled; the DCForum software requires cookies to work properly.

Previous Topic | Next Topic

Printer-friendly copy Email this topic to a friend

Reading Topic #13308

Member since Aug-29-02 · 94 posts

LAST EDITED ON Oct-16-02 AT 11:28 PM (EDT)

Every time I was browsing through the MSTS forum, I've been feeling sort of to blame, that I am basically using somebody's work without giving something back in return. At the point when I have collected 29 different Routes installed in my MSTS collection, I realized that it was getting extremely difficult to keep track on all the activities, that I have completed (or failed to complete for some reason), or would like to run in the future. And here goes my first MSTS add-on, that, due to the lack of time, I spent about three weeks working on. This is a simple utility program, that would allow you to automatically load all the Routes' and Activities' names (from .trk and .act files on your system, NOT the folders' names where they are located) into its database tables for your future use and tracking the progress of the activities' completion. I used MS Access (works with 2000 or XP only) as the front end and the database, and the VB code to implement the "auto loading functionality".Now, I realize, this is nothing comparing to the "works of art" that you, guys, are creating. However, this program might become handy when the number of routes on your system reaches double-digits, and you start making notes somewhere on the outcome of some activities. It did become useful to me, and hopefully your work and play can also benefit from it. I just really wanted to make some contribution to the great society of the MSTSers, that I am enjoying being a part of. I would be really happy and interested to hear from you (whether you have downloaded it already, or just reading through this post), if this idea might become useful at all. If you are interested, the file (acttrku1.zip) was posted in the library today, and can be found either in the New Files section, or just by searching by the file name.Thanks a lot!
Yours,
Eugene.P.S. It was a cruel coincidence, that next day after I finished programming and testing this utility, I lost a job with my fromer IT company. Well, I will have to start all over again, but on the bright side, I will, probably, have more time to play and enjoy MSTS

Attachments
Activities Tracking Database-Utility – image 2
http://www.train-sim.com/dcforum/User_files/3dae2ce36f284227.jpg

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

RE: Activities Tracking Database-Utility, bob hahn, Oct-17-02, 01:25 PM, (1) RE: Activities Tracking Database-Utility, elevit, Oct-17-02, 02:30 PM, (2) RE: Activities Tracking Database-Utility, phantomlord98, Oct-17-02, 06:39 PM, (3) RE: Activities Tracking Database-Utility, elevit, Oct-17-02, 07:03 PM, (4) RE: Activities Tracking Database-Utility, phantomlord98, Oct-17-02, 11:51 PM, (5) RE: Activities Tracking Database-Utility, dvdhoven, Oct-18-02, 09:41 AM, (6) RE: Activities Tracking Database-Utility, elevit, Oct-18-02, 10:11 AM, (7) RE: Activities Tracking Database-Utility, geekman, Oct-18-02, 01:52 PM, (8) RE: Activities Tracking Database-Utility, elevit, Oct-18-02, 02:29 PM, (9) RE: Activities Tracking Database-Utility, ozace50, Oct-18-02, 06:28 PM, (10) RE: Activities Tracking Database-Utility, elevit, Oct-18-02, 07:22 PM, (11) RE: Activities Tracking Database-Utility, dgauci, Oct-18-02, 07:48 PM, (12) RE: Activities Tracking Database-Utility, elevit, Oct-18-02, 08:57 PM, (13) RE: Activities Tracking Database-Utility, dgauci, Oct-18-02, 09:25 PM, (14) RE: Activities Tracking Database-Utility, ozace50, Oct-19-02, 06:13 AM, (15) RE: Activities Tracking Database-Utility, elevit, Oct-19-02, 10:31 AM, (16) RE: Activities Tracking Database-Utility, downside, Oct-19-02, 02:25 PM, (17) RE: Activities Tracking Database-Utility, elevit, Oct-19-02, 03:27 PM, (18) RE: Activities Tracking Database-Utility, downside, Oct-20-02, 06:58 AM, (19) RE: Activities Tracking Database-Utility, elevit, Oct-20-02, 09:28 AM, (20) RE: Activities Tracking Database-Utility, zeke, Oct-20-02, 04:32 PM, (21) RE: Activities Tracking Database-Utility, elevit, Oct-20-02, 05:39 PM, (22)

Conferences | Topics | Previous Topic | Next Topic

Member since Aug-29-02 · 94 posts

RE: Activities Tracking Database-Utility

Dear Bob:Thanks for expressing the interest in this program. Well, I'd wish I could reproduce this error on my system - that would make it much easier to investigate where this error is coming from. Unless I deliberately modify something within this macro, I can't reproduce it, and nobody so far reported anything (from 300 + downloads yesterday and today). But let's try and see how we can solve this.
First of all, I have a feeling that the problem might not lie inthe macro itself (it just opens the main form automatically whenever you start/open the .mdb file). What I wanna ask you first is, if you have any email address that would be able to accept an approx. 3 Mb file. I want to modify this file, zip it, and send it to you. The modification would include just eliminating the use of this macro. I will tell you how to start the main screen manually (one double-click, actually). If the main form opens successfully, that means something was wrong with the macro usage in your case, and you can just forget about it, and open the form by double-clicking on it, when needed. However, the more likely scenario is, that the form will give you some error, while trying to open. You will be able then to describe this error to me (and maybe post the screenshots), and maybe we'll get closer to some conclusion or a fix.So, please, let me know if I can send it to you, and the address for it (you can e-mail your address at elevit@rogers.com ). If you don't have this kind of an address, you can use my ftp server to get it from me directly (I'll tell you my ftp details in the email).Thanks a lot, and sorry if it didn't work in your case, at least from the first effort.Sincerely,
Eugene.

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Member since Jul-17-02 · 10 posts

RE: Activities Tracking Database-Utility

I downloaded the Database yesterday and have the exact same problem. I'm running Window 2000 with Office 2000.

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Member since Aug-29-02 · 94 posts

RE: Activities Tracking Database-Utility

Dear phantomlord98:We are trying with bob hahn to use this file without Macro involved to determine the source of the problem. As I said, unfortunately, I cannot reproduce this problem on either of the three systems that I have access to (Win 95 with Office 2000, win XP with Office XP, win XP with Office 2000). I will let you know about the results.Sorry about that.
Eugene.

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 1423 posts

RE: Activities Tracking Database-Utility

Hi,Why are you using a macro to display the start form?
I always use the menu Extra (In English called Tools, I believe) > Start Up and then specify a Form.
In the Load event of the Starting Form, I put some lines of code to Maximize the Form:
DoCmd.SelectObject acForm
DoCmd.MaximizeI hate macro's. My Access databases just run on VBA.Dick van den HovenActivities Tracking Database-Utility – image 6

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Member since Aug-29-02 · 94 posts

RE: Activities Tracking Database-Utility

Thanks, Dick:Yes, that's another possibility, but I have never had problems with using autoExec macro before, and thought both these options are equally good. Apperently, it does not seem to be the macro, that causing the problems on some systems. When I asked the users to by-pass this Macro, Access still crashes at some point. So far, there are 3 cases like that reported (out of 400 + downloads), but obviously, it can not satisfy me, and we are trying to work it out. In your case, was it giving errors originally, and after the change you mentioned (starting the form by specifying it in the start-up menu) it started working normally? Please, let me know.Thanks a lot,
Eugene.

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 129 posts

RE: Activities Tracking Database-Utility

Hi Eugene,I'd really like to use this, but I'm on Office 97. Anyway you can save this database in an Access 97 format? I can't open it.Larry

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Member since Aug-29-02 · 94 posts

RE: Activities Tracking Database-Utility

Thank you, Larry.Well, you can convert the database (2000 or XP format) into 97 format. As far as I remember, the program asks you if you wanna convert (and save under the different name) after you double-click on the .mdb file. I have Office 97 as well, so I tried that when testing. The conversion went fine, however, when I actually ran it, I immediately encountered some errors of incompatibility of VB code. I am pretty sure there should be a way to download sort of VB-functionality, but I am not sure (yet) what patch you need for that, and don't want to mislead you. So, for now, it should work for the majority of the users with Office 2000 or XP. Having said that, I will have a look at the Office 97 compatibility, when I have a chance. If I come up with some solution, I will definitely let you know.Thanks a lot.
Regards,
Eugene.

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Member since Jul-25-02 · 15 posts

RE: Activities Tracking Database-Utility

Hi elevit,This looks like a really useful addon for oldtimers like me with memory problems (me, not the compoter!!). I can install it, and I can get the activities added the first time. My problem is that, when I go to add new activites, I get the following error message:synatx error (missing operator) in query expression "Pullin' stuff',13,'N/A');'Is there a missing double quote in there? or something else?Pullin' stuff is the name of the new activity in the Activities folder of the Seattle Line.I'm running Windows XP Pro with Access XP.Does this help or add extra confusion?Cheers,

ozace50

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Member since Aug-29-02 · 94 posts

RE: Activities Tracking Database-Utility

Hi, ozace50:Yes, that's, I guess, when the real testing begins. The reason for that is that it treats 'Pullin' as the complete string, and then does not understand what stuff' is, expecting an operator. Believe it or not, among my 31 (already) routes installed, not a single activity contained an ' character in its name. I will do the fix for that as soon as I have some time. What I suggest as the quickiest solution for you right now is just to go to the ROUTES\Seattle\ACTIVITIES folder (or similar path) of your MSTS, find the pullinstuff.ace file (or whatever the corresponding file name is), open it with notepad, find the line Name ( "Pullin' stuff" ), and either delete the ' chracter, or just substitute it for the letter 'g', so you would have the name "Pulling stuff". Save this file and close it. Please try adding this activity to the database now. Don't forget to periodically Compact the database, as I have described in the Readme file.Please, let me know if it worked for now.
Eugene.P.S. Thank you for the nice, encouraging comments. I need them now

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 820 posts

RE: Activities Tracking Database-Utility

Activities Tracking Database-Utility – image 7

Please take this as constructive criticism and not as a flame. I did download your database and started to debug it to see if I could get it to work.Some suggestions:Don't use macros. Use the startup property from the tools menu as a much cleaner way to start your applications.I found that the database crashing while loading the initial form is because of many coding errors, the VBA code won't compile. The vast majority of these errors were many undeclared variables being used in your code modules.While Access will allow you to use variables without explicitly declaring them, (unless Option Explicit is selected, which it should be), this is considered a very poor programming style. Also by not declaring the variable types, all of the variables were by default being treated as variants which is very slow and resource intensive.Once I had cleared out the above errors by properly declaring all of the variables and their types, I was able to get the database to load. This was running under Windows XP Pro with Office 2000 Developers Edition.

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Member since Aug-29-02 · 94 posts

RE: Activities Tracking Database-Utility

LAST EDITED ON Oct-18-02 AT 09:16 PM (EDT)

Thanks, dgauci:I gladly accept any critisism, so don't worry about that. I do agree on the data types, that were sometimes omited. However, I do not think I used any undeclared variables at all. You probably referer to some variable names, that are actually the names of the objects of the form. These names are becoming sort of global, or public, if you want, and can be (at least in the majority of cases)accessed by all of the procedures of the form. Otherwise, the logic itself would not work at all, and the code would not probably even compile on my 3 different systems. Could you please, give me some examples of these variables used in the code, that you think were not declared? I do program in PL/SQL mostly, and tend to never leave or use anything undeclared.I do appreciate your input and help to this, as, I guess, testing it on just 3 different systems was not enough, but was a positive indicator. I do agree on not using start-up macro as well. I've also just made a fix for a parsing bug that one of the previous messages in this thread was mentioning. However, I'll wait for a while before uploading a 2nd version of it. Maybe something else will be discovered.Thanks a lot.
Best regards,
Eugene.

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 820 posts

RE: Activities Tracking Database-Utility

Activities Tracking Database-Utility – image 8

I'll go through and format the forms code modules and then flag the variables the compiler is stopping on. I'll send the .mdb to your private email.

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Member since Jul-25-02 · 15 posts

RE: Activities Tracking Database-Utility

Hi elevit,Thanks for the reply with the changes - I have just done that (renamed the Activity name to Pulling Stuff), and your database application found the activities and added them to the database. So that's one bug successfully sorted out.Cheers,

ozace50

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Member since Aug-29-02 · 94 posts

RE: Activities Tracking Database-Utility

Thanks, ozace50:I have actually made a program fix for this parsing bug. I am not uploading a new version so far - just want to wait if something else is found that should be fixed. I can send you the new file (1.89 Mb -zipped) by the email, if you wish. However, if you don't have any activities that have a "'" in its name, you don't actually need it for now.Thanks,
Eugene.

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 929 posts

RE: Activities Tracking Database-Utility

I am having the same problem with Access crashing. I have Access 2000 running on an XP machine.Hope you do manage to sort it so that I can throw all the scraps of paper I have jotted down my progress in activities on in the waste bin Bill

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Member since Aug-29-02 · 94 posts

RE: Activities Tracking Database-Utility

Thanks, Bill:Are you having a parsing problem (with "'" character inside the activity name)? If yes, then, please, let me know, and I will send you the new zip file (1.89 Mb) with a fix for that. If it is some other sort of a problem, please follow the sequence of steps below to check the VB references. That helped several people already.1) Open the .mdb file by-passing the startup macro (press and hold the 'shift' button while double-cliking on the .mdb file)
2) The 'Routes' form should be highlighted under the 'Forms' object category (if not, please, highlight it). Now, instead of clicking on 'Open' button, please, click on the one located to the right of it, the 'Design' button, with the blue triangle on it.
The 'Routes' form should open in the design mode.
3) Double-click on any button on the form, e.g. on the "Add New Route" button.
4) On the little Properties window, that has just opened, select 'Event' tab (should be already selected), find and highlight (click on) the 'On Click' property, and then click
on the tiny button with three horizontal dots on it, located on the very right of the 'On Click' line. The Visual Basic Window should open
5) In VB window go to menu Tools -> References.
6) This is the key step. Please, make sure the following 5 References are activated (selected , checked):
a) Visual Basic for Applications,
b) Microsoft Access 9.0 Object Library (or similar),
c) OLE Automation
d) Microsoft DAO 3.6 Object Library (or similar)
e) Microsoft Visual Basic for Applications Extensibility5.3 (or similar).If they are not selected, check them, please, and UNCHECK (deselect) everything else, except for those 5 above.7) Press OK. Press the 'Save' button in the upper left corner of VB screen. Close VB window, close button propeties little window. Close the whole .mdb file (save the 'Routes' form, if prompted).
8) Run the program now and see if it's working.Please, let me know.
Thanks,
Eugene.

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Member since Aug-29-02 · 94 posts

RE: Activities Tracking Database-Utility

Dear Bill:Indeed, you just need a new file with the parsing bug fixed. Please, let me know (if you want, by sending me a message at elevit@rogers.com) you e-mail address, so I could attach the zip file (1.89Mb).Thanks,
Eugene.

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Member since Aug-27-02 · 4 posts

RE: Activities Tracking Database-Utility


I've had the same problems with the access crashing. I tried to hold "Shift" while loading the mdb file, but it opens in wordpad. .mdb files are associated with Access. Any chance of seeing an update solving this?Rob 'Zeke' ZychOshawa,Ont.
Trainsimming since July 26th, 2002

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Member since Aug-29-02 · 94 posts

RE: Activities Tracking Database-Utility

Dear Rob:
If you are just having a parsing problem (similar to message #19 in this thread), please, let me know (if you want, by sending me a message at elevit@rogers.com) your e-mail address, so I could send you the new file with the fix - the zip file (1.89Mb). Make sure this account will hold this size of an attachment.Thanks,
Eugene.

Alert | IP


[ Home | MSTS Forum | MSTS FAQ | File Library ] Copyright © 2002 by Nels Anderson. All Rights Reserved.

Restored from the Train-Sim.Com archive, captured November 3, 2002. About this archive.