opening another database

G

Guest

I have a database to store employee activities for the year. As we progress
to a NEW year, I am trying keep the data of the two years seperate.
Option1 is to change my query to ask for the year?

'***** Current query that will pull 2004 and 2005 data
In the Date field criteria,

Like [Enter Month 1=Jan] & "*"
'*******


Option2 is to launch my 2004 database via a command button. Here is the
code I have tried, but doesn't work.

'******************************
Dim stAppName As String

stAppName = "\\pkcfp009\esn\[Contact Center Planning]\[Database
Files]\[Employee Task 2004.mdb]"
Call Shell(stAppName, 1)
'******************************

Any solution you can give me for either option would be greatly appreciated.

David
 
G

Guest

Here is the code I use and it works fine...it is similar to your code.

Dim strAppPath As String
Dim strMdbPath As String
Dim strShellString As String
strAppPath = "C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE"
strMdbPath = "C:\Documents and Settings\jhardy66\Desktop\CoolMenu2.mdb"
strShellString = """" & strAppPath & """ """ & MdbPath & """"
Call Shell(strShellString)



The Shell() syntax is as follows:
Shell( "Path to Access exe", "Path to Access DB")

Hope that helps,
Jonathan Hardy
 
T

Tom Ross

following option two you will have many databases with one table each by
2010

Use a query with a WHERE clause "Where year([activitydate] = 2005"
(activitydate being your date field)

Keepint it all together gives you many more historical search and compare
options later.

If you must break up the information, it might be easier to make additional
tables in your database (Activity2004) then you can just open that table to
get old infor.

Tom
 

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