Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Update Excel Database via Access Main Database with a script | New Users to Excel | |||
Updating Excel forecasts into an Access Database | Excel Worksheet Functions | |||
Cross updating Excel file and SQL 2000 database | Excel Programming | |||
Updating database from excel sheet with macro | Excel Programming | |||
Updating database table from Excel? | Excel Programming |