Dumb question.....

GI_Mike25

New member
Local time
Today, 02:42
Joined
Jun 15, 2006
Messages
5
Ok, I've spent about 3 hours building my table, and now want to actually use it ;). I think I can do everything except this one thing. Which I could probably write a whole bunch of unneeded VB code to do it, but hopefully you guys can provide a better answer.

Ok, my table has 326 records. Each record has a field with a dos command in it. So 326 dos commands total. In my form, I want to create a command button that will launch the dos command I have listed in the field of the current record.

i.e. record 1: blahblah1.exe, record 2: blahblah2.exe. If I'm viewing record 1, I want to launch blahblah1.exe, record 2, blahblah2.exe so on and so forth.

There's probably an extremely easy way to do this, but I don't use access much and have never really learned. Any help would be greatly appreciated. :)

GI_Mike25
 
This worked in a quick test:

Shell (Me.TextboxName), vbNormalFocus

where the textbox contained the path to the exe.
 
Nevermind. After restarting the DB and reopening the form it worked like a charm! Thanks :)

*edit* ok, so it is working, but not like i want it to. perhaps this is just an access problem. I've stored the data for the command prompt like so:

c:\test\open.exe file1 - for the first record
c:\test\open.exe file2 - for the second, so on and so forth

when using the command button, the program runs, but says that the file could not be found. when i copy the text from the db table, and paste it into the windows start menu run thingamajig, it works like it should. probably a syntax error, but i don't know how since the program is running in the shell.......

ok, let me quit beating around the bush and put my problem straight out there.

my database is a list of games for my commodore 64 emulator. the command button is opening the game using the emulator.

i.e. c:\test\ccs ghostbusters.d64

Using access, this is what the emulator does when it's been run from my command button

"Ready.
Load"*",8,1

searching for "*"

?file not found error
ready."

When I run the same command through windows, it loads * and when I type the good ol "run" under the ready prompt it loads the game as it's supposed to.

Hopefully this explains my problem a little better and brings back some memories for those commodore buffs out there :)
 
Last edited:
Found the answer

The reason it wasn't pulling the file was because the directory was wrong. That's all it was. Apparently Access automatically defaults to the office directory, even though you've already declared a path.

For instance, my shell command. I ran it as such Shell (c:\test\open.exe file1). Access directed itself to the c:\test folder for the exectuable, but for some reason was stupid enough to look for file1 in the default office folder. So the program ran, but the file was not found because it was looking for it in the wrong spot. So if anybody else has this issue, before you run the shell, do a chdrive to the proper drive, do a chdir to the proper directory, then run your shell command like I did above. It will execute as it should after that.
 
Just curious, hows a database make opening game easier? If im missing out of something I would like to know...I could do this with all my emulations...
 
My rom files have multiple games per file and are named numerically. So in order to find the game you want, you have to open a text list, do a search, find the rom file you want, open the emulator, then open the rom file. This way, I can find what game I want in the database, and launch the rom file through the emulator automatically.

If you have the extension set up to open through emulator already, then all you have to do is find the game and double click. Using a database for a single game rom file is a bit pointless, unless you just want something to do, or just want a program to store a list of all your roms.
 

Users who are viewing this thread

Back
Top Bottom