Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Access Database


How can I use an access data base from within Excel.
I already have all the information that is in this database in a
seperate worksheet and search this when I need to do so. I believe that
the search
criteria and speed is far better if I could utilise an access database
but dont know how to do this from within excel. I would like to achieve
this with a bit of VB behind a commandbutton.
Have I asked too much in one question.


--
grahammal
------------------------------------------------------------------------
grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=510665

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 486
Default Access Database

Have you investigated using Data - Get External Data - New Database Query?
You don't really specify in a lot of detail what you are trying to do. You
can also retrieve an ADODB recordset (based on an Select query) which I have
code for but if the first option will work then I recommend going with
that...
--
HTH...

Jim Thomlinson


"grahammal" wrote:


How can I use an access data base from within Excel.
I already have all the information that is in this database in a
seperate worksheet and search this when I need to do so. I believe that
the search
criteria and speed is far better if I could utilise an access database
but dont know how to do this from within excel. I would like to achieve
this with a bit of VB behind a commandbutton.
Have I asked too much in one question.


--
grahammal
------------------------------------------------------------------------
grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=510665


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Access Database

See this example
http://www.rondebruin.nl/accessexcel.htm

I like the second example workbook where you can save the criteria

--
Regards Ron de Bruin
http://www.rondebruin.nl


"grahammal" wrote in message
...

How can I use an access data base from within Excel.
I already have all the information that is in this database in a
seperate worksheet and search this when I need to do so. I believe that
the search
criteria and speed is far better if I could utilise an access database
but dont know how to do this from within excel. I would like to achieve
this with a bit of VB behind a commandbutton.
Have I asked too much in one question.


--
grahammal
------------------------------------------------------------------------
grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=510665



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 486
Default Access Database

Very nice addition to your site Ron. I have not downloaded the workbooks yet
but I like the very generic and easy to follow way you create your SQL
statement. I will in all likelyhood borrow some of your code for that. I use
something similar but not as easy for the average non-SQL person to
impliment. My only comment would be the second line on the page is "I go try
to change that on this webpage."
--
HTH...

Jim Thomlinson


"Ron de Bruin" wrote:

See this example
http://www.rondebruin.nl/accessexcel.htm

I like the second example workbook where you can save the criteria

--
Regards Ron de Bruin
http://www.rondebruin.nl


"grahammal" wrote in message
...

How can I use an access data base from within Excel.
I already have all the information that is in this database in a
seperate worksheet and search this when I need to do so. I believe that
the search
criteria and speed is far better if I could utilise an access database
but dont know how to do this from within excel. I would like to achieve
this with a bit of VB behind a commandbutton.
Have I asked too much in one question.


--
grahammal
------------------------------------------------------------------------
grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=510665




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Access Database

Thanks

I am also an beginner with Access so I hope it is useful for others
Will add another page soon for sending info to Access

My only comment would be the second line on the page is

My English is bad<g, I go change that now Jim


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Jim Thomlinson" wrote in message
...
Very nice addition to your site Ron. I have not downloaded the workbooks yet
but I like the very generic and easy to follow way you create your SQL
statement. I will in all likelyhood borrow some of your code for that. I use
something similar but not as easy for the average non-SQL person to
impliment. My only comment would be the second line on the page is "I go try
to change that on this webpage."
--
HTH...

Jim Thomlinson


"Ron de Bruin" wrote:

See this example
http://www.rondebruin.nl/accessexcel.htm

I like the second example workbook where you can save the criteria

--
Regards Ron de Bruin
http://www.rondebruin.nl


"grahammal" wrote in message
...

How can I use an access data base from within Excel.
I already have all the information that is in this database in a
seperate worksheet and search this when I need to do so. I believe that
the search
criteria and speed is far better if I could utilise an access database
but dont know how to do this from within excel. I would like to achieve
this with a bit of VB behind a commandbutton.
Have I asked too much in one question.


--
grahammal
------------------------------------------------------------------------
grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=510665








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Access Database

Hi Jim

Do you mean that I must add the ""

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Ron de Bruin" wrote in message ...
Thanks

I am also an beginner with Access so I hope it is useful for others
Will add another page soon for sending info to Access

My only comment would be the second line on the page is

My English is bad<g, I go change that now Jim


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Jim Thomlinson" wrote in message
...
Very nice addition to your site Ron. I have not downloaded the workbooks yet
but I like the very generic and easy to follow way you create your SQL
statement. I will in all likelyhood borrow some of your code for that. I use
something similar but not as easy for the average non-SQL person to
impliment. My only comment would be the second line on the page is "I go try
to change that on this webpage."
--
HTH...

Jim Thomlinson


"Ron de Bruin" wrote:

See this example
http://www.rondebruin.nl/accessexcel.htm

I like the second example workbook where you can save the criteria

--
Regards Ron de Bruin
http://www.rondebruin.nl


"grahammal" wrote in message
...

How can I use an access data base from within Excel.
I already have all the information that is in this database in a
seperate worksheet and search this when I need to do so. I believe that
the search
criteria and speed is far better if I could utilise an access database
but dont know how to do this from within excel. I would like to achieve
this with a bit of VB behind a commandbutton.
Have I asked too much in one question.


--
grahammal
------------------------------------------------------------------------
grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=510665








  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 486
Default Access Database

No worries... Me understand... My battle cry is "Bad spellers of the world...
Untie".

Here is my code for an Access query. It accepts the Pieces of an SQL
statement and returns either a connected or disconnected record set. The
connected recordset is great as you can make you changes and just write them
back with an update statement...

Option Explicit

'Declare Module Level Constants
Private Const m_cDBLocation As String = "C:\MyDatabse.mdb"


Public Function RunQuery(ByVal strSelect As String, ByVal strFrom As String, _
ByVal strWhere As String, ByVal strOrderBy, ByVal blnConnected As Boolean)
As ADODB.Recordset
Dim strConnection As String

On Error GoTo ErrorHandler
strConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" &
m_cDBLocation & ";"

Set RunQuery = New ADODB.Recordset
With RunQuery
.CursorLocation = adUseClient
.CursorType = adOpenStatic
.LockType = adLockBatchOptimistic
End With

RunQuery.Open strSelect & " " & strFrom & " " & strWhere & " " &
strOrderBy, strConnection, , , adCmdText
If blnConnected = False Then Set RunQuery.ActiveConnection = Nothing
End Function

Sub Example()
Dim rst As ADODB.Recordset

Set rst = RunQuery("Select *", "From tblMyTable", "", ";", False)

End Sub

This requires a reference to the ADODB library...
--
HTH...

Jim Thomlinson


"Ron de Bruin" wrote:

Thanks

I am also an beginner with Access so I hope it is useful for others
Will add another page soon for sending info to Access

My only comment would be the second line on the page is

My English is bad<g, I go change that now Jim


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Jim Thomlinson" wrote in message
...
Very nice addition to your site Ron. I have not downloaded the workbooks yet
but I like the very generic and easy to follow way you create your SQL
statement. I will in all likelyhood borrow some of your code for that. I use
something similar but not as easy for the average non-SQL person to
impliment. My only comment would be the second line on the page is "I go try
to change that on this webpage."
--
HTH...

Jim Thomlinson


"Ron de Bruin" wrote:

See this example
http://www.rondebruin.nl/accessexcel.htm

I like the second example workbook where you can save the criteria

--
Regards Ron de Bruin
http://www.rondebruin.nl


"grahammal" wrote in message
...

How can I use an access data base from within Excel.
I already have all the information that is in this database in a
seperate worksheet and search this when I need to do so. I believe that
the search
criteria and speed is far better if I could utilise an access database
but dont know how to do this from within excel. I would like to achieve
this with a bit of VB behind a commandbutton.
Have I asked too much in one question.


--
grahammal
------------------------------------------------------------------------
grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=510665







  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 486
Default Access Database

You don't have to add the "" but if you want to quote me, be my guest <g.
Just change "go" to "will"
--
HTH...

Jim Thomlinson


"Ron de Bruin" wrote:

Hi Jim

Do you mean that I must add the ""

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Ron de Bruin" wrote in message ...
Thanks

I am also an beginner with Access so I hope it is useful for others
Will add another page soon for sending info to Access

My only comment would be the second line on the page is

My English is bad<g, I go change that now Jim


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Jim Thomlinson" wrote in message
...
Very nice addition to your site Ron. I have not downloaded the workbooks yet
but I like the very generic and easy to follow way you create your SQL
statement. I will in all likelyhood borrow some of your code for that. I use
something similar but not as easy for the average non-SQL person to
impliment. My only comment would be the second line on the page is "I go try
to change that on this webpage."
--
HTH...

Jim Thomlinson


"Ron de Bruin" wrote:

See this example
http://www.rondebruin.nl/accessexcel.htm

I like the second example workbook where you can save the criteria

--
Regards Ron de Bruin
http://www.rondebruin.nl


"grahammal" wrote in message
...

How can I use an access data base from within Excel.
I already have all the information that is in this database in a
seperate worksheet and search this when I need to do so. I believe that
the search
criteria and speed is far better if I could utilise an access database
but dont know how to do this from within excel. I would like to achieve
this with a bit of VB behind a commandbutton.
Have I asked too much in one question.


--
grahammal
------------------------------------------------------------------------
grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=510665









  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Access Database

Just change "go" to "will"

Done

Thanks

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Jim Thomlinson" wrote in message
...
You don't have to add the "" but if you want to quote me, be my guest <g.
Just change "go" to "will"
--
HTH...

Jim Thomlinson


"Ron de Bruin" wrote:

Hi Jim

Do you mean that I must add the ""

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Ron de Bruin" wrote in message ...
Thanks

I am also an beginner with Access so I hope it is useful for others
Will add another page soon for sending info to Access

My only comment would be the second line on the page is
My English is bad<g, I go change that now Jim


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Jim Thomlinson" wrote in message
...
Very nice addition to your site Ron. I have not downloaded the workbooks yet
but I like the very generic and easy to follow way you create your SQL
statement. I will in all likelyhood borrow some of your code for that. I use
something similar but not as easy for the average non-SQL person to
impliment. My only comment would be the second line on the page is "I go try
to change that on this webpage."
--
HTH...

Jim Thomlinson


"Ron de Bruin" wrote:

See this example
http://www.rondebruin.nl/accessexcel.htm

I like the second example workbook where you can save the criteria

--
Regards Ron de Bruin
http://www.rondebruin.nl


"grahammal" wrote in message
...

How can I use an access data base from within Excel.
I already have all the information that is in this database in a
seperate worksheet and search this when I need to do so. I believe that
the search
criteria and speed is far better if I could utilise an access database
but dont know how to do this from within excel. I would like to achieve
this with a bit of VB behind a commandbutton.
Have I asked too much in one question.


--
grahammal
------------------------------------------------------------------------
grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=510665











  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 486
Default Access Database

It's a thing of beauty... I trust you don't mind if I lift your idea for my
own purpose...
--
HTH...

Jim Thomlinson


"Ron de Bruin" wrote:

Just change "go" to "will"


Done

Thanks

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Jim Thomlinson" wrote in message
...
You don't have to add the "" but if you want to quote me, be my guest <g.
Just change "go" to "will"
--
HTH...

Jim Thomlinson


"Ron de Bruin" wrote:

Hi Jim

Do you mean that I must add the ""

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Ron de Bruin" wrote in message ...
Thanks

I am also an beginner with Access so I hope it is useful for others
Will add another page soon for sending info to Access

My only comment would be the second line on the page is
My English is bad<g, I go change that now Jim


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Jim Thomlinson" wrote in message
...
Very nice addition to your site Ron. I have not downloaded the workbooks yet
but I like the very generic and easy to follow way you create your SQL
statement. I will in all likelyhood borrow some of your code for that. I use
something similar but not as easy for the average non-SQL person to
impliment. My only comment would be the second line on the page is "I go try
to change that on this webpage."
--
HTH...

Jim Thomlinson


"Ron de Bruin" wrote:

See this example
http://www.rondebruin.nl/accessexcel.htm

I like the second example workbook where you can save the criteria

--
Regards Ron de Bruin
http://www.rondebruin.nl


"grahammal" wrote in message
...

How can I use an access data base from within Excel.
I already have all the information that is in this database in a
seperate worksheet and search this when I need to do so. I believe that
the search
criteria and speed is far better if I could utilise an access database
but dont know how to do this from within excel. I would like to achieve
this with a bit of VB behind a commandbutton.
Have I asked too much in one question.


--
grahammal
------------------------------------------------------------------------
grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=510665














  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Access Database


That's why I run my site Jim
Have fun with it

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Jim Thomlinson" wrote in message
...
It's a thing of beauty... I trust you don't mind if I lift your idea for my
own purpose...
--
HTH...

Jim Thomlinson


"Ron de Bruin" wrote:

Just change "go" to "will"


Done

Thanks

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Jim Thomlinson" wrote in message
...
You don't have to add the "" but if you want to quote me, be my guest <g.
Just change "go" to "will"
--
HTH...

Jim Thomlinson


"Ron de Bruin" wrote:

Hi Jim

Do you mean that I must add the ""

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Ron de Bruin" wrote in message ...
Thanks

I am also an beginner with Access so I hope it is useful for others
Will add another page soon for sending info to Access

My only comment would be the second line on the page is
My English is bad<g, I go change that now Jim


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Jim Thomlinson" wrote in message
...
Very nice addition to your site Ron. I have not downloaded the workbooks yet
but I like the very generic and easy to follow way you create your SQL
statement. I will in all likelyhood borrow some of your code for that. I use
something similar but not as easy for the average non-SQL person to
impliment. My only comment would be the second line on the page is "I go try
to change that on this webpage."
--
HTH...

Jim Thomlinson


"Ron de Bruin" wrote:

See this example
http://www.rondebruin.nl/accessexcel.htm

I like the second example workbook where you can save the criteria

--
Regards Ron de Bruin
http://www.rondebruin.nl


"grahammal" wrote in message
...

How can I use an access data base from within Excel.
I already have all the information that is in this database in a
seperate worksheet and search this when I need to do so. I believe that
the search
criteria and speed is far better if I could utilise an access database
but dont know how to do this from within excel. I would like to achieve
this with a bit of VB behind a commandbutton.
Have I asked too much in one question.


--
grahammal
------------------------------------------------------------------------
grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=510665














  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 486
Default Access Database

What a relief. I have "Borrowed" lots of stuff. <bg
--
HTH...

Jim Thomlinson


"Ron de Bruin" wrote:


That's why I run my site Jim
Have fun with it

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Jim Thomlinson" wrote in message
...
It's a thing of beauty... I trust you don't mind if I lift your idea for my
own purpose...
--
HTH...

Jim Thomlinson


"Ron de Bruin" wrote:

Just change "go" to "will"

Done

Thanks

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Jim Thomlinson" wrote in message
...
You don't have to add the "" but if you want to quote me, be my guest <g.
Just change "go" to "will"
--
HTH...

Jim Thomlinson


"Ron de Bruin" wrote:

Hi Jim

Do you mean that I must add the ""

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Ron de Bruin" wrote in message ...
Thanks

I am also an beginner with Access so I hope it is useful for others
Will add another page soon for sending info to Access

My only comment would be the second line on the page is
My English is bad<g, I go change that now Jim


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Jim Thomlinson" wrote in message
...
Very nice addition to your site Ron. I have not downloaded the workbooks yet
but I like the very generic and easy to follow way you create your SQL
statement. I will in all likelyhood borrow some of your code for that. I use
something similar but not as easy for the average non-SQL person to
impliment. My only comment would be the second line on the page is "I go try
to change that on this webpage."
--
HTH...

Jim Thomlinson


"Ron de Bruin" wrote:

See this example
http://www.rondebruin.nl/accessexcel.htm

I like the second example workbook where you can save the criteria

--
Regards Ron de Bruin
http://www.rondebruin.nl


"grahammal" wrote in message
...

How can I use an access data base from within Excel.
I already have all the information that is in this database in a
seperate worksheet and search this when I need to do so. I believe that
the search
criteria and speed is far better if I could utilise an access database
but dont know how to do this from within excel. I would like to achieve
this with a bit of VB behind a commandbutton.
Have I asked too much in one question.


--
grahammal
------------------------------------------------------------------------
grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=510665















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
Update Excel Database via Access Main Database with a script Finnbar New Users to Excel 2 November 3rd 08 07:24 PM
Access Database John Excel Discussion (Misc queries) 0 August 29th 05 07:54 AM
Access Database [email protected] Excel Programming 2 February 14th 05 11:21 PM
VBA Database access - How? Simon Sunke Excel Programming 3 January 23rd 04 12:24 PM
VBA Database access Simon Sunke Excel Programming 3 January 23rd 04 11:56 AM


All times are GMT +1. The time now is 05:38 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"