Excel not Access

I have designed an Access database that holds  records relating to my stores 
audit results going back for about 5 years plus a load more information 
relating to these stores. This was used to produe a pack once a month, 
however a change in senior management means that I have got to shelve this 
and prodce a similar pack  in Excel.

The idea would be that the user could select a month or a 12 mnth date range 
that would produce data that could then be used to populate a number of excel 
templates that have been designed. Having not used excel for years I would be 
grateful for any suggestions on what route to take.

Thanks
0
Fred1060 (110)
1/17/2006 6:30:03 AM
excel.newusers 15348 articles. 2 followers. Follow

3 Replies
1257 Views

Similar Articles

[PageSpeed] 36

Are you familiar with SQL? If so, you could keep the Access database and use
ADO to retrive the data to Excel, and then do the report in Excel. The SQL
could be parameter driven to get the month or range of data required. Here
is an example of some Access data maintenance macros

Sub AddData()
Dim oConn As Object
Dim oRS As Object
Dim sSQL As String

    Set oConn = CreateObject("ADODB.Connection")
    oConn.Open = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
                 "Data Source=" & "c:\bob.mdb"

    sSQL = "INSERT INTO Contacts (FirstName, LastName,Phone, Notes) " & _
           "        VALUES ('Bob','Phillips','01202 345678','me')"
    oConn.Execute sSQL

    oConn.Close
    Set oConn = Nothing
End Sub

Sub GetData()
Const adOpenForwardOnly As Long = 0
Const adLockReadOnly As Long = 1
Const adCmdText As Long = 1
Dim oRS As Object
Dim sConnect As String
Dim sSQL As String
Dim ary

    sConnect = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
               "Data Source=" & "c:\bob.mdb"

    sSQL = "SELECT * From Contacts"
    Set oRS = CreateObject("ADODB.Recordset")
    oRS.Open sSQL, sConnect, adOpenForwardOnly, _
                adLockReadOnly, adCmdText

    ' Check to make sure we received data.
    If Not oRS.EOF Then
        ary = oRS.getrows
        MsgBox ary(0, 0) & " " & ary(1, 0) & ", " & ary(2, 0)
    Else
        MsgBox "No records returned.", vbCritical
    End If

    oRS.Close
    Set oRS = Nothing
End Sub

Sub UpdateData()
Const adOpenForwardOnly As Long = 0
Const adLockReadOnly As Long = 1
Const adCmdText As Long = 1
Dim oConn As Object
Dim oRS As Object
Dim sConnect As String
Dim sSQL As String
Dim ary

    sConnect = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
               "Data Source=" & "c:\bob.mdb"

    sSQL = "SELECT * From Contacts"
    Set oRS = CreateObject("ADODB.Recordset")
    oRS.Open sSQL, sConnect, adOpenForwardOnly, _
                adLockReadOnly, adCmdText

    ' Check to make sure we received data.
    If oRS.EOF Then
        MsgBox "No records returned.", vbCritical
    Else
        sSQL = "UPDATE Contacts  " & _
               "       SET Phone = 'None' " & _
               "WHERE FirstName = 'Bob' AND LastNAme = 'Phillips'"
        oRS.ActiveConnection.Execute sSQL

        sSQL = "SELECT * From Contacts"
        oRS.ActiveConnection.Execute sSQL
        ary = oRS.getrows
        MsgBox ary(0, 0) & " " & ary(1, 0) & ", " & ary(2, 0)
    End If


    oRS.Close
    Set oRS = Nothing
End Sub

--
HTH

RP
"fred" <fred@discussions.microsoft.com> wrote in message
news:5F05357F-A927-4F46-8FB6-A8E68F2F995C@microsoft.com...
> I have designed an Access database that holds  records relating to my
stores
> audit results going back for about 5 years plus a load more information
> relating to these stores. This was used to produe a pack once a month,
> however a change in senior management means that I have got to shelve this
> and prodce a similar pack  in Excel.
>
> The idea would be that the user could select a month or a 12 mnth date
range
> that would produce data that could then be used to populate a number of
excel
> templates that have been designed. Having not used excel for years I would
be
> grateful for any suggestions on what route to take.
>
> Thanks


0
bob.phillips1 (6510)
1/17/2006 8:14:19 AM
Hi fred,

Thanks to ODBC you're not limited to one app over the other. Since you 
have worked in Access and are likely familiar with SQL and using 
queries, I recommend using MS Query. Open a blank Excel spreadsheet and 
select Data | Import External Data | New Database Query.  When the 
Choose Data Source window opens, select MS Access Database. NOTE: MAKE 
SURE that the "Use the Query Wizard to create/edit queries" is 
UNCHECKED...this is because the Query Wiz is stupid & does not know 
about joins.  Click OK. From the Select Database window, find your .mdb 
file and select it. MS Query will open a GUI that looks very similar to 
the Access QBE grid, and a list of database objects (click the Options 
buttons and make sure all boxes are checked), including queries. Add the 
desired objects to your query. Note that MS Query cannot "see" the 
relational joins created in the Access db; you have to join tables on 
key fields manually.  Once you save the query, however, it will 
remember. The commands are very similar to the Access query window, so 
you should have no trouble creating queries, relating objects or setting 
criteria; you can even create parameter queries that prompt the user. 
After the query has been run, select File | Return data to Microsoft 
Office Excel and the recordset will be exported to the spreadsheet you 
originally opened, unless you specify otherwise. Save this workbook with 
an appropriate name. Any time you wish to requery the data, open the 
worksheet, right-click on any cell, and select Edit Query.  It would 
probably be fairly simple to set up an Excel User Form to automate the 
process so that the user need never see the query.

Tushar Mehta has a nice tutorial with some easy-to-follow examples at 
http://www.tushar-mehta.com/excel/newsgroups/rdbms_in_excel/index.html

Hope this helps!

LeAnne



fred wrote:
> I have designed an Access database that holds  records relating to my stores 
> audit results going back for about 5 years plus a load more information 
> relating to these stores. This was used to produe a pack once a month, 
> however a change in senior management means that I have got to shelve this 
> and prodce a similar pack  in Excel.
> 
> The idea would be that the user could select a month or a 12 mnth date range 
> that would produce data that could then be used to populate a number of excel 
> templates that have been designed. Having not used excel for years I would be 
> grateful for any suggestions on what route to take.
> 
> Thanks
0
nospam2791 (369)
1/17/2006 3:41:09 PM
I add also a few examples on my site yesterday
Will add more soon

http://www.rondebruin.nl/accessexcel.htm



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


"Bob Phillips" <bob.phillips@notheretiscali.co.uk> wrote in message news:uCTEH4zGGHA.3532@TK2MSFTNGP14.phx.gbl...
> Are you familiar with SQL? If so, you could keep the Access database and use
> ADO to retrive the data to Excel, and then do the report in Excel. The SQL
> could be parameter driven to get the month or range of data required. Here
> is an example of some Access data maintenance macros
>
> Sub AddData()
> Dim oConn As Object
> Dim oRS As Object
> Dim sSQL As String
>
>    Set oConn = CreateObject("ADODB.Connection")
>    oConn.Open = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
>                 "Data Source=" & "c:\bob.mdb"
>
>    sSQL = "INSERT INTO Contacts (FirstName, LastName,Phone, Notes) " & _
>           "        VALUES ('Bob','Phillips','01202 345678','me')"
>    oConn.Execute sSQL
>
>    oConn.Close
>    Set oConn = Nothing
> End Sub
>
> Sub GetData()
> Const adOpenForwardOnly As Long = 0
> Const adLockReadOnly As Long = 1
> Const adCmdText As Long = 1
> Dim oRS As Object
> Dim sConnect As String
> Dim sSQL As String
> Dim ary
>
>    sConnect = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
>               "Data Source=" & "c:\bob.mdb"
>
>    sSQL = "SELECT * From Contacts"
>    Set oRS = CreateObject("ADODB.Recordset")
>    oRS.Open sSQL, sConnect, adOpenForwardOnly, _
>                adLockReadOnly, adCmdText
>
>    ' Check to make sure we received data.
>    If Not oRS.EOF Then
>        ary = oRS.getrows
>        MsgBox ary(0, 0) & " " & ary(1, 0) & ", " & ary(2, 0)
>    Else
>        MsgBox "No records returned.", vbCritical
>    End If
>
>    oRS.Close
>    Set oRS = Nothing
> End Sub
>
> Sub UpdateData()
> Const adOpenForwardOnly As Long = 0
> Const adLockReadOnly As Long = 1
> Const adCmdText As Long = 1
> Dim oConn As Object
> Dim oRS As Object
> Dim sConnect As String
> Dim sSQL As String
> Dim ary
>
>    sConnect = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
>               "Data Source=" & "c:\bob.mdb"
>
>    sSQL = "SELECT * From Contacts"
>    Set oRS = CreateObject("ADODB.Recordset")
>    oRS.Open sSQL, sConnect, adOpenForwardOnly, _
>                adLockReadOnly, adCmdText
>
>    ' Check to make sure we received data.
>    If oRS.EOF Then
>        MsgBox "No records returned.", vbCritical
>    Else
>        sSQL = "UPDATE Contacts  " & _
>               "       SET Phone = 'None' " & _
>               "WHERE FirstName = 'Bob' AND LastNAme = 'Phillips'"
>        oRS.ActiveConnection.Execute sSQL
>
>        sSQL = "SELECT * From Contacts"
>        oRS.ActiveConnection.Execute sSQL
>        ary = oRS.getrows
>        MsgBox ary(0, 0) & " " & ary(1, 0) & ", " & ary(2, 0)
>    End If
>
>
>    oRS.Close
>    Set oRS = Nothing
> End Sub
>
> --
> HTH
>
> RP
> "fred" <fred@discussions.microsoft.com> wrote in message
> news:5F05357F-A927-4F46-8FB6-A8E68F2F995C@microsoft.com...
>> I have designed an Access database that holds  records relating to my
> stores
>> audit results going back for about 5 years plus a load more information
>> relating to these stores. This was used to produe a pack once a month,
>> however a change in senior management means that I have got to shelve this
>> and prodce a similar pack  in Excel.
>>
>> The idea would be that the user could select a month or a 12 mnth date
> range
>> that would produce data that could then be used to populate a number of
> excel
>> templates that have been designed. Having not used excel for years I would
> be
>> grateful for any suggestions on what route to take.
>>
>> Thanks
>
> 


0
rondebruin (3790)
1/18/2006 6:03:26 PM
Reply:

Similar Artilces:

How can I create an invoicing database in Excel?
I would like to know how to create an invoicing database, or register in Excel. (Invoice + tax = total) Are there any templates free online? thanks How about a web search? http://office.microsoft.com/en-us/templates/default.aspx search for invoice -- Regards, Peo Sjoblom (No private emails please, for everyone's benefit keep the discussion in the newsgroup/forum) "Vcollins" <Vcollins@discussions.microsoft.com> wrote in message news:C46E9FE2-0B38-4468-9B00-126B7EE5C9A2@microsoft.com... >I would like to know how to create an invoicing database, or register in &...

how can I restore unsaved changes in excel #2
...

Writing formula for excel worksheet
Item Rate1 Rate2 Rate3 A 3 4 6 B 8 5 23 C 56 5 78 Above is my excel sheet. I want to write some formula so that in every row cell having minimum rate should come bold. Like For Item A - Rate1(3) for Item B - Rate2(5) For Item C - Rate2 (5) There may be a neater way but this works. Somewhere in you sheet in a cell type =min(A1:a4), I used L1 Change this to watever range you are trying to evaluate. Then select this range and click format - conditional format - cell value - is equal to =($L$1) and apply your bold font. The lowest value in the range will then become bold. Mike "Gaur...

Excel 2000 fail to open workbook
Hi, I have one Excel template. If we open it on Excel 2000, the Excel will hang, and the process occupy cpu 95% ~98%. But we can open this tempalte in Excel 2003 normally, and if we save this tempalte in Excel 2003, and then open it in Excel 2000, it work normally too. Excel 2000 (9.0.3821 SR-1) Excel 2003 (11.8231.8221) sp3 Would you help us to find the reason for this issue? Thanks, Nancy Hi Nancy, Perhaps there was some (probably minor) corruption/inconsistency in the workbook that Excel 2003 could fix but Excel 2000 couldn't. -- Cheers macropod [Microsoft MVP - Word] ...

Why my Access 2007's response is so slow?
Hi all, I have a machine with spec AMD Athlon 64 X2 2.6Ghz and 4GB of Memory running on a 32bit Windows Vista. When I switch the views from design to forms/reports, Access needs to think for at least a few seconds before it could response to me. It also sometimes happends on when I tried to move around the objects in the design view of form/report. I tried it in another pretty old XP machine. The problem didn't exist. At first I thought it was the problem of the network. So I copied the file to local and do the same thing, but it didn't help. What else can I do ...

Is this possible within Excel 2000?
Hi, I've used Excel on a get by basis for many years at work, and I'm just beginning to realise its vast capabilities, having viewed several groups which I didn't know existed previously. I subsequently would like to ask if it is possible for Excel to look at the numerical or text content of a cell on one worksheet and then look at a predefined range on another worksheet and find the equivalent cell content and then move the cursor to that cell? This has me stumped presently. Thanks in advance for any assistance. J.J. To actually move the selection, you'd need to use a litt...

Excel -> Access Import Bizarreness
A guy gave me an Excel file that he needs me to covert to XML. No problem. Slurp it into a database and use a DataSet.WriteXML() call to turn it into an XML file. But I can't import it into Access because it has "Merged Cells". For example, data that should look like this: ColA ColB ----- ----- Rec1 this Rec2 this Rec3 this Rec4 that Rec5 Other The three "this" cells have been merged into one tall cell: ColA ColB ----- ----- Rec1 this Rec2 Rec3 Rec4 that Rec5 Other I need to "unmerge" these, but I know almost nothi...

Error in Exchange 5.5 Public Folder access via Outlook 2000
Hi We're running Exchange 5.5 SP4 on NT4, with the May 2004 rollup (841765 - Store.exe and Mdbmsg.dll = 5.5.2658.4) Outlook 2003 clients can access a shared Public Folders contacts list fine through the Address Book application, but Outlook 2000 users can't. Both groups can see and manipulate the actual folder OK, it's just the Address Book that's not working (either through the Address Book icon, or through creating a new mail and clicking on the "To" button and selecting the folder from there). Outlook 2000 users see a blank list, with the slider on the right siz...

Can't access comcast newsgroups in outlook express 6 or Outlook 2003
Hi, I had the comcast news server working in both aps, but trying to make it work with outlook 2003 as the default program to access the newsgroup reader, by removing the newsgroup account in outlook express 6, I now can't get it to connect in either ap. duh... It's completely gone from Outlook 2003, ie, where before, under the go button there was a link to news, now there is not. Outlook express 6 still has the newsgroup reader, that's how I'm sending this, but when i try to go to the comcast news server it repeatedly asks for my username and password. I deleted the a...

Enumerate Excel Global variables
Anyone know if there's a way to enumerate the global variables within a workbook when opening it for automation? I know that you can write a macro in a general module that exposes a variable and then call that macro via: Excel.Application.Run(MacroName) But what if you have no control over the development of the Excel workbook and cannot dictate that a macro be written to expose the variable you're interested in? In fact in the case I'm dealing with I don't even know the name of the variable. All I know is that the workbook may have global variables of a COM component of a c...

Access Packaging Wizard
Hi, I need to add a DWORD to the registry key section within the Access 2007 Package Wizard. The link http://msdn2.microsoft.com/en-us/library/bb501030.aspx shows a section in the wizard as TYPE. I have downloaded and installed the package wizard from this page and the TYPE section is not available. How do I add a DWORD using the pacakging wizard. Regards John Found the solution. Regards John "John" <jmlee@btconnect.com> wrote in message news:eB9TiN7cIHA.148@TK2MSFTNGP04.phx.gbl... > Hi, > I need to add a DWORD to the registry key section within the Access 2007...

Headers in Excel #3
Can you tell me if it's possible and if so, how I can change the header cells, i.e. A B C D E ... etc? Thanks. Andrea (508) 842-3880 Hi Andrea no this is not possible. The best workaround you can achieve is: - use row 1 as header - goto cell A2 and to the menu 'Windows - Freeze Panes' to always show row 1 - in 'Tools - Options - view' you can hide the row and column headers -- Regards Frank Kabel Frankfurt, Germany "Andrea" <shrews.receptionist@nitco-lift.com> schrieb im Newsbeitrag news:12ff301c44354$b88982b0$a501280a@phx.gbl... > Can you tell ...

Opening Excel '97
I have MS Excel '97 on my computer at work. I notice that when I open multiple excel files the program just puts all of the files in one window. I would prefer to have the files open up in individual windows. Is there a way to tell Excel to open everything in a new window? I know that I can just open up a new Excel window then open the file, but I would rather just click on the file and have it open a new window automatically. Any thoughts out there? xl2k was the first version to offer Tools|Options|view tab|windows in taskbar. It showed each window as a different icon on the ...

Error upon launching excel
I receive the following error every time I launch Excel (Office 200 Pro): Forward-most box: MICROSOFT VISUAL BASIC - Compile error: Can't find project or library (OK) I click OK, and behind it is: Large window: MICROSOFT VISUAL BASIC - GWXL97.XLA [break] small window within: GWXL97.XLA - Startup Macro (Code) I have to ok my way through these every time I attempt to start Excel, either by selecting the program, or selecting an *.xls file to launch it. Please help. Chris A reply from Rob Bovey (via google): This is the add-in for Novel Groupwise. It sounds like it was removed f...

Sharing an excel spreadsheet
I am trying to make an Excel spreadsheet so that people from different departments can put information into it and then we can save it as one spreadsheet -- my hope is that from this spreadsheet we could see at any particular time just where this particular item is in our manufacturing process or when it left. I have put the spreadsheet in a shared folder and mapped a drive to the spreadsheeet. I am using 2007 and the other people are using 2003. I have made saved the file so that it is in compatibility mode. They can put the information in, but they can not save the information to ...

E-mail Part of excel sheet
How do you select and e-mail part of a work sheet, each time i try i get the whole sheets as part of the e-mail On Sun, 19 Oct 2003 01:52:02 -0700, "Ron" <anonymous@discussions.microsoft.com> wrote in microsoft.public.excel.misc: >How do you select and e-mail part of a work sheet, each >time i try i get the whole sheets as part of the e-mail I don't think it can readily be done programmatically. However, if you use an e-mail client which supports messages in HTML (I use Outlook), you can copy/paste a part of your worksheet into the body of the message. To create...

excel file can't be opened #2
hi,I'm cho I have a recent excel file (about 1 month),but since two days ago,the file can't be opened completely or always not responding. What should I do so that I can use this important file. Any help would be appreciated regards, cho ...

adds staff to access list to ALL PROJECTS if same as their departm
A procedure was written to update all projects, adds staff to access list to ALL PROJECTS if they are the same as their home department. It would be useful to know if there were a feature to define default projects by a given criteria - i.e. By department. [d]elete accesslest insert accesslest (PACONTNUMBER, PAPROJNUMBER, EMPLOYID, ContractEntry, ContractInquire, ContractReport, ContractReview, ProjectEntry, ProjectInquire, ProjectReport, ProjectReview, ALEntry, ALInquire, ALReport, ALReview, EEEntry, EEInquire, EEReport, EEReview, ELEntry, ELInquire, ELReport, ELReview, FFEnt...

How to transpose in excel file
Hi I would like to make a transpose like this? From House Defect How much #1 Broken Sinks 1000 #1 Bad Paint 2000 #1 Bad Lighting 1000 #2 Broken Sinks 0 #2 Bad Paint 2000 #2 Bad Lighting 100 and Transpose into House Broken Sinks Bad Paint Bad Lighting #1 1000 2000 1000 #2 0 2000 100 A Pivot Table will do that and more. Set House as row field, Defect as column field and How much as data. HTH. Best wishes Harald "vilfood" <vilfood@d...

Excel example-formula C4+C5 adds before data in C5 Can I get it t.
I'm trying to create a formula (for example): In cell D5 I want it to add C4+C5. I would like it to work only after there is data in C5, but not before. How can I get it to work only when there is data in C4 & C5? Right now its showing what I have in C4. =if(count(c4:c5)<2,"Not enough values!",c4+c5) New Excel User wrote: > > I'm trying to create a formula (for example): > In cell D5 I want it to add C4+C5. I would like it to work only after there > is data in C5, but not before. How can I get it to work only when there is > data in C4 & C5? R...

how do i enable dde in excel?
i am posting a DDE link into an excel cell from an external program and getting the message ' DDE Not enabled' in the cell once the link is pasted in. how do i enable DDE? ...

Excel 07 selects 3 cells when I click on 1
Hi I just got 2007 (I want 2000 back) and a lot of the time when click on an empty cell 2 or more below it are selected and the typing goes on the bottom row. I just want to select the cell I click on. Thanks Are the cells merged?? I don't like the 2007 either! If i could i would have the look and feel of 2003 on the engine of 2007... :-( On Thu, 1 Nov 2007 20:21:01 -0700, Brian <Brian@discussions.microsoft.com> wrote: >Hi I just got 2007 (I want 2000 back) and a lot of the time when click on an >empty cell 2 or more below it are selected and the typing goes on the botto...

Excel 2003/edit/replace. Under Options/Look In, values is AWOL bu.
Under Look In options Find allows for search by formulae OR values OR comments Replace is restricted to formulaes ONLY WHY? cp Have a look at this google search result. This topic came up a couple days ago and was addressed by Dave and Myrna. http://snipurl.com/cd9j Gord Dibben Excel MVP On Fri, 28 Jan 2005 03:49:02 -0800, "cp" <cp@discussions.microsoft.com> wrote: >Under Look In options >Find allows for search by formulae OR values OR comments >Replace is restricted to formulaes ONLY >WHY? ...

Controlling Access to Contact's History
Is there a way to set a security role up so a user can't delete items from a Contact's History? The user would still need rights to read/ write to the contact record. Go to Settings-->business unit settings-->security roles Choose a role to edit (other than system administrator, you can't change that one). Select the Core Records tab. History, in terms of tasks and appointments, is controlled by the Activity row. History, in terms of notes, is controlled by the Note row. You can set the read and write "pies" seperately from the Delete "pie". Clear th...

Cannot access a file -- HELP
I have this problem at work (using Excel 2000 Windows 2000) and at home (Excel 2003, Windows XP Pro). SOMETIMES...not always, I try to access a file on a network drive I get the message: "path..filename could not be found. Check the spelling of the file name and verify that the file location is correct". Once I get the message on that file, I always get it on the file....but there might be 27 others in the same folder that I can open. And I get the message if I try to open the file via explorer or via Excel. If I copy the file to my C: drive it opens fine. I even tried t...