Linking and NavigationPane -
11-09-2011
, 12:50 PM
A while back I mentioned I had an application in A2007/2010 that
opened with the NavigationPane (database window) closed. However, if
I attempted to Link to a spreadsheet (Docmd.Transferspreadsheet
acLink) in a form it would pop the NavigationPane open. My kludge at
that time was to Import rather than Link since Importing did not open
up the NavigationPane.
I have a new, and I think, better kludge after reading a bit on the
internet. I forgot completely about hiding the database window
command and I thank the person that thought outside of the box.
Docmd.Transferspreadsheet acLink...
DoCmd.SelectObject acTable, "SomeTableInTheDatabase", True
DoCmd.RunCommand acCmdWindowHide
I'm not keen on adding the additionional lines of code but I can now
link a spreadsheet without opening the databasewindow and that meets
my requirements. I thought I'd pass on this kludge in case you have a
similar problem in the future. |