AppActivate

Z

Ziv Riezman

Hi All

When i run an Access 2002 mdb the function AppActivate is working
after Compiling the Mdb to an MDE the AppActivate command
isn't working any suggestion
my OS is winXp Sp1, jet4 SP

Thanks in advanc
Ziv Riezman
 
M

Michael Cheng [MSFT]

Hi Ziv,

From your descriptions, I understood that function AppActivate could not be
active in MDE but it works well in MDB files. Have I understood you? If
there is anything I misunderstood, please feel free to let me know :)

However, I am not sure about your coding of AppActivate. Could you show me
how it works in your scenario? Will there be any error message when you try
to make it effective? Would you please show me more detailed information so
that I could make it reproduced in my machine?

Based on my testing, I make a mdb file in Access 2002-2003 format and add a
command button in one new created Form, add sub like
Private Sub Command2_Click()
'Method 1
Dim MyAppID, ReturnValue
AppActivate "Microsoft Word" ' Activate Microsoft Word

'Method 2: AppActivate can also use the return value of the Shell function.
MyAppID = Shell("C:\Program Files\Microsoft Office\OFFICE11\WINWORD.EXE",
1)
' Run icrosoft Word.

End Sub

The codes above could be both effective in mdb file and mde file on my
machine

Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to let me know. We are here to be of assistance!

Sincerely yours,

Michael Cheng
Microsoft Online Support
***********************************************************
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only, many thanks.
 
Z

Ziv Riezman

Hi

my problen is then i open my Access DB I Open Word, then i want to gain
focus on my Access App, After opening word i write,
AppActivate "DF Main Menu" Which is my app window caption
this line doesn't work after i compile my mdb to mde,
the focus remains on the word app

Thanks in advance !
 
M

Michael Cheng [MSFT]

Hi Ziv,

I am sorry but I could not understood you fully, I am not very sure about
what you want.

Based on my understanding, if you open Word from Access, would you like to
typing something into Word? Or just want to get back to Access From without
any delay? In this case, I think you may try [wait] parameter in
AppActivate. You could write the codes like this(asumming the form titled
with 'Table1'):
Private Sub Command2_Click()

Dim MyAppID, ReturnValue
MyAppID = Shell("C:\Program Files\Microsoft Office\OFFICE11\WINWORD.EXE",
1)
AppActivate "Table1", False
Me.Text3.SetFocus

End Sub

Above codes work well both in my mdb files and mde files. It is highly
appreciated if you could provide sample codes for me to reproduce your
issue. More detailed information, I believe, will get us closer to the
resolutions

Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to let me know. We are here to be of assistance!


Sincerely yours,

Michael Cheng
Microsoft Online Support
***********************************************************
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only, many thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top