Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compacting and Send keys statement

Status
Not open for further replies.

CHTHOMAS

Programmer
Jun 16, 1999
106
AE
I am using the following send keys statements to compact the currently open db. The compacting takes place at fixed timer intervals based on a form.

AppActivate "Microsoft Access"
SendKeys ("%(W1)")
SendKeys "%(TDC)", False

If i have the db open, ie maximised on the screen when the compacting takes place, then the compacting takes place correctly.
If i have minimised the db, then if i am in explorer i am getting the pop up form "Disconnect Network Drive" followed by the list of drives i want to disconnect.
I know that the above problem arises since the access is running the send keys function to explorer.

Can anybody help me by suggesting how to get the focus to currenly open Access db before compacting or any other method or solutions to overcome the above problem?

Regards and Thanks

Charley





 
Hi there,

this is a problem you'd better not use the "sendkeys" command for; that's always a little tricky, certainly when the program is not mean for your own use... On a similar question I gave a suggestion (question posted 22.01). I'm not totally sure this is the correct line of code, but by the end of the week I'll be able to look it up.

The kid.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top