New Excel data using old database, queries and filter

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am in the process of learning access and have set up database using an
excel file that changes every month. I would like to import the new data into
the old database because I already have queries and filters set up in it that
I will stay constant is this possible? I would only like to see the new data
in the table and queries.

Thank you in advance,
Marilyn

p.s. if you know of a good site that will teach me access I would love to
hear about it.
 
Hi Marylin - welcome to Access!

For some help on learning Access, you can check out www.Functionx.com
There are also some great forums out there. This one (obviously) and
www.experts-exchange.com are just two...

As for your issue, you want to import a new spreadsheet (or at least new
data) into an existing database?

You can do this by importing as a table.
You can also link to a spreadsheet - then any changes are automatically
changed in the dtabase too...

There are several ways to do this.
If you data is always the same format, then I'd recommend linking the table.

if you need to replace a table and import a new one, then this can be done
too.

if you let me know what is best for you, i'll walk you through it..

Danny
 
Thank you for your help.

I will be importing a new excel spreadsheet every month but using the same
queries and filters I have currently in the database. Is this possible?

Thank you again I am ever so greatful!!
 
Yes, it's possible.

The question was about the data, though.
Is the spreadsheet always the same layout?

Danny
 
OK
This is an example of how to delete the existing table and import a new
spreadsheet into your database, through code (VBA)

You can fire this from an OnClick event of a command button.

'******************************************************
On Error Resume Next '<-- we have this as the delete table command
'<-- will error if there's no table

Dim myTable As String
myTable = "Name of table here" '<--like "tbl_Employees" for
example

Dim myFile As String
myFile = "file address here" '<--Like "C:\My
Documents\test.xls" for example

'First, delete existing table
DoCmd.DeleteObject acTable, myTable

'Now, import new table
DoCmd.TransferSpreadsheet acImport, , myTable, myFile, True
'******************************************************
 
Dear Sir

If my data also come from excel with same column headings, but it is saved
....in next month folder name (i.e. from "Jan10" to "Feb10") and excel file
name is also changed from e.g. ABC-Jan.xls to ABC-Feb.xls

How can I do that? I am acess novice

Thanks in advance
 
Back
Top