LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Updating Access Database from Excel need help

Running Office 2000 Pro, Utilizing Excel to generate
reports and data entry, however the different types of
data and the amount of data really should be in a
database, so I am reworking the application. But having a
problem.

I have tried several examples from the VB help files,
books, and suggestions from others to do updates to an
Access database from the Excel spread sheet, I am able to
query the data into the sheet but not able to update back
to access.

When I try using Workspace or Database as a type I
receive invalid user defined type error message. Is there
a definition that I need or some addin that I'm missing?
Nothing has clearly stated where these come from?

The code I use for querying was generated using the
record macro and selecting from the menues the external
data new query selection

With ActiveSheet.QueryTables.Add(Connection:=Array
(Array( _
"ODBC;DSN=MS Access
Database;DBQ=H:\dvctracking\DVCTracking.mdb;Defaul tDir=H:\
d
vctracking;DriverId=25;FIL=MS Access;MaxBufferSize=204" _
), Array("8;PageTimeout=5;")), Destination:=Range
("A1"))
.CommandText = Array( _
"SELECT HomeBase.HomeBase" & Chr(13) & "" & Chr
(10) & "FROM `H:\dvctracking\DVCTracking`.HomeBase
HomeBase" _
)
.Name = "Query from MS Access Database"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = True
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.PreserveColumnInfo = True
.Refresh BackgroundQuery:=False
End With

What is it I'm missing or overlooking, I've tried to
modify the above query command to do the updates by
changing the sql statment, modifing the different options
and commands and still have had no luck as well


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Update Excel Database via Access Main Database with a script Finnbar New Users to Excel 2 November 3rd 08 07:24 PM
Updating Excel forecasts into an Access Database Maree Maxfield Excel Worksheet Functions 1 December 7th 05 03:54 PM
Cross updating Excel file and SQL 2000 database Richard Ponti Excel Programming 0 May 17th 04 04:22 AM
Updating database from excel sheet with macro Suzana Excel Programming 2 December 16th 03 08:11 AM
Updating database table from Excel? hmmm... Excel Programming 1 July 25th 03 03:21 PM


All times are GMT +1. The time now is 12:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"