Posts: 1,769
Threads: 410
Joined: Feb 2003
I'm having a problem pulling up a specific access db when there are other dbs open. is there a way when i open a particular db to give that window a unique identifyer so that i can pull it up?
i tried using the handle and global a variable but if there are other dbs already open it pulls them up first and grabs their handle rather than the one that is open. i tried useing 0x200 on the run command but it didnt help.
any way to do this?
tx
Posts: 1,271
Threads: 399
Joined: Mar 2003
what about changing the window text ?
Posts: 1,769
Threads: 410
Joined: Feb 2003
i can't do it quick enough after the run command to keep it from bringing up another open Access db and renaming that one.
can do it in a run command?
Posts: 1,271
Threads: 399
Joined: Mar 2003
btw. is your program access ??
Posts: 1,769
Threads: 410
Joined: Feb 2003
yes, it is.
FYI:the window tittle does give the db name (which is unique) but only if the db is maximised within the Access main window.
Posts: 1,271
Threads: 399
Joined: Mar 2003
have you tried catching your db with the 'Find accessible object' function ?'
Posts: 1,769
Threads: 410
Joined: Feb 2003
I don't know how to use it. can you help with that?
Posts: 1,271
Threads: 399
Joined: Mar 2003
make a new macro, paste:
<font color=#0080f0>EA_Main </font>_hwndqm
and run the macro.
:roll:
Posts: 1,769
Threads: 410
Joined: Feb 2003
WOW that gets a lot of info....
so here's what i did...
Acc a=acc("" "TITLEBAR" "Microsoft Access" "ODb" "db1 : Database (Access 2000 file format)" 0x1004)
act a
however it won't bring the window up; does "act" even work like I'm using it?
Posts: 12,092
Threads: 142
Joined: Dec 2002
In QM 2.1.4, run can wait for window and get handle. Use the "Run program" dialog. Specify window, and set option "Run anyway".
However, there is theoretic possibility that run can retrieve wrong window, and I don't know any reliable solution for this.
Posts: 1,769
Threads: 410
Joined: Feb 2003
Yeah, I tried that 0x800 but it didn't work (i.e. it pulled up the other Access window).
Does anyone know a command line thing that would maximize the windows within Access?
Posts: 1,271
Threads: 399
Joined: Mar 2003
what happens when you try to load the db again ?
maybe access will switch to that db ?
i tried it with dreamweaver and photoshop, it works :roll:
Posts: 1,769
Threads: 410
Joined: Feb 2003
it pulls up the othe db. run was what i was using before with some of the options but it was seeing the other db as the prog and pulled it up.