AutoHotkey Community

It is currently May 26th, 2012, 1:26 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: November 27th, 2008, 10:57 am 
Offline

Joined: November 27th, 2008, 10:51 am
Posts: 6
Location: Stuttgart
Hi,

Is there any possibility to control a specific form of an access database? For example, I'd like to open a particular form of my application pressing a key. BTW, is it possible to open a form without displaying the access environment all around (which could run in the background...)?

Thank you all for your help

Guillaume


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 27th, 2008, 11:30 am 
Offline
User avatar

Joined: May 10th, 2007, 10:54 am
Posts: 649
Location: .switzerland
Why use Autohotkey and not Visual Basic which is directly implemented in access...?

Quote:
BTW, is it possible to open a form without displaying the access environment all around (which could run in the background...)?

Don't think so. But, you can restric access to tables, forms and other functions in the properties.

_________________
http://securityvision.ch
AHK 2D GAME ENGINE


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 27th, 2008, 11:52 am 
Offline

Joined: November 27th, 2008, 10:51 am
Posts: 6
Location: Stuttgart
Grüezi!

Thanks for your reply.

Of course, I use vba in my application, but I can't access the vba functions while being in an other applicaiton than Office. For example, I am in Firefox and I'd like to check or add something in my DB, I press a key and the form I want gets opened directly.
Do you know what I mean? I just want to know if there is a way of accessing a specific form of the DB with AHK.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 27th, 2008, 12:05 pm 
Offline
User avatar

Joined: May 10th, 2007, 10:54 am
Posts: 649
Location: .switzerland
Quote:
Grüezi!

moin :D

Quote:
Of course, I use vba in my application, but I can't access the vba functions while being in an other applicaiton than Office. For example, I am in Firefox and I'd like to check or add something in my DB, I press a key and the form I want gets opened directly.
Do you know what I mean? I just want to know if there is a way of accessing a specific form of the DB with AHK.

I see.
Well, u can use ADO COM Library from sean :arrow: http://www.autohotkey.com/forum/topic16565.html for direct acess the DB.

Or, u can redirect a (global) hotkey with AHK to the Access form (send the keys to the Access-Window-Form which may be hidden or minimized)

_________________
http://securityvision.ch
AHK 2D GAME ENGINE


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 27th, 2008, 12:19 pm 
Offline

Joined: November 27th, 2008, 10:51 am
Posts: 6
Location: Stuttgart
Hi and thanks again!

Quote:
Or, u can redirect a (global) hotkey with AHK to the Access form (send the keys to the Access-Window-Form which may be hidden or minimized)


Yes! That's exactly what I'd like to do but I don't know the command for it.
For example, if I write Run, xyz.mdb, it will run the application but how can I specify the form to be shown?
Do you know it?

Merci!

Guillaume


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 27th, 2008, 12:56 pm 
Offline
User avatar

Joined: May 10th, 2007, 10:54 am
Posts: 649
Location: .switzerland
I would say u can simply use commandline switches for access: here is a german list: arrow: http://support.microsoft.com/kb/209207

Quote:
/x Makro Startet Access und führt das angegebene Access-
Makro aus. Eine andere Methode zum Datenbank oder
Ausführen eines Makros beim Öffnen Access-
einer Datenbank ist die Verwendung Projekt
eines AutoExec-Makros.

so u can start a macro which can open your form... have fun :D

_________________
http://securityvision.ch
AHK 2D GAME ENGINE


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 27th, 2008, 1:13 pm 
Offline

Joined: November 27th, 2008, 10:51 am
Posts: 6
Location: Stuttgart
Thanks again. It sounds interesting.

Just a question: can I use these commandlines with or through AHK?
I mean, I'd like to assign an hotkey to different forms, so that the key Y opens the form YYY and the key X, the form XXX.

Am sorry if my questions appear a bit silly :oops:
am quite a beginner in this domain.

Thanks for your help.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 27th, 2008, 1:45 pm 
Offline
User avatar

Joined: May 10th, 2007, 10:54 am
Posts: 649
Location: .switzerland
sure u can :)

Code:
;define some Variables:
PathToAccess := "C:\Programme\Access.exe"
PathToMDB := "C:\dbs\my.mdb"
return ;end of autoexecution

;define a hotkey:
#a:: ;[win] + [A] starts makro1
 run, %comspec% \c "%PathToAccess%" "%PathToMDB%" /x makro1
return

#b:: ;[win] + [B] starts makro2
 run, %comspec% \c "%PathToAccess%" "%PathToMDB%" /x makro2
return

So, u have to create the makros one and two, and let them open (form.show maby, not sure) your desired forms...

_________________
http://securityvision.ch
AHK 2D GAME ENGINE


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 27th, 2008, 1:55 pm 
Offline

Joined: November 27th, 2008, 10:51 am
Posts: 6
Location: Stuttgart
Great!!

Thank you very much, that's what I tried to do without success, now I know how to proceed
Thanks once again for your help.

Guillaume


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 27th, 2008, 2:24 pm 
Offline
User avatar

Joined: May 10th, 2007, 10:54 am
Posts: 649
Location: .switzerland
Quote:
Thanks once again for your help.

always a pleasure :wink:

_________________
http://securityvision.ch
AHK 2D GAME ENGINE


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Cerberus, SifJar and 23 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group