Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel as front end to an Access database - is it possible?

Hello

I want to have Microsoft Excel act as an editing front end to Microsoft
Access via an SQL query. Basically a query - eg

SELECT SubTable.*, MainTable.* FROM MainTable INNER JOIN SubTable ON
MainTable.SiteID = SubTable.CustomerID;

So that a user can for example go in and edit a postcode and then somehow
save any changes made.

Would this be possible?

Any guidance on the procedure would be most appreciated.

Angus Comber




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Excel as front end to an Access database - is it possible?

Yes, you'd need to code in the VBA IDE.

If you plan on using DAO to connect to an Access database,
the code will be similar to:

Private Sub subGetData()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim strSQL As String
Dim strConn As String

strConn = ThisWorkbook.Path & "\db1.mdb"
strSQL = "Select * From tCustomers;"
' you can substitue query names if the queries are internally
' defined queries (inside of Access in this case)
Set db = DAO.Database.Open(strConn)
Set rs = db.OpenRecordset(strSQL)

With rs
'... process ...
End With
rs.Close
Set rs = Nothing
db.Close
Set db = Nothing
End Sub

You can use ADO in a similar manner. You'll need to include a
reference to DAO or ADO or whatever MDAC routines you prefer
to use. Microsoft tends to suggest using ADO.

Hope that helps.

--
Jim Carlock
http://www.microcosmotalk.com
Feel free to post back to the newsgroup!


"Angus Comber" wrote in message
...
Hello

I want to have Microsoft Excel act as an editing front end to Microsoft
Access via an SQL query. Basically a query - eg

SELECT SubTable.*, MainTable.* FROM MainTable INNER JOIN SubTable ON
MainTable.SiteID = SubTable.CustomerID;

So that a user can for example go in and edit a postcode and then somehow
save any changes made.

Would this be possible?

Any guidance on the procedure would be most appreciated.

Angus Comber






Reply
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
Replacing DataBase causes front end apps from completing opening silent_tiger[_2_] Excel Discussion (Misc queries) 0 July 23rd 09 01:08 AM
Update Excel Database via Access Main Database with a script Finnbar New Users to Excel 2 November 3rd 08 07:24 PM
Excel Database or Access?? Centrol Excel Worksheet Functions 1 October 27th 08 09:56 AM
Excel or Access for building front end to small data-set? Peter K Excel Discussion (Misc queries) 2 January 18th 06 10:49 PM
excel front end to access Steve Peterson Excel Discussion (Misc queries) 1 January 20th 05 10:31 PM


All times are GMT +1. The time now is 11:42 PM.

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

About Us

"It's about Microsoft Excel"