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
1202 Views

Similar Articles

[PageSpeed] 46

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:

Change background color of query results from access in worksheet
Hi, I have Excel 2007 and selected Date => From Access and then navigated to an Access DB and selected a query. I chose "Table" view. The query results now appear in my worksheet which is great. However, I want to change the background. Right now it alternatives by row between a light blue and a darker blue. I want the results to have a white background with black borders but have been unable to change the format. If I go to Home and select No fill for a color background nothing happens. Is there a way to change the query results? Thanks, Could be the r...

Excel Lookup formulas
Hi, I have two questions: 1. I notice (occassionally) when I am using Vlookup/Hlookup to import data to another worksheet that the rules to not immediatley reflect the correct data. However, if I click on each data cell, and validate the formula (by clicking on the 'tick') it immediatley returns the correct data. Is there anyway of doing a bulk refresh that will somehow re-activate the rules that appear to have become dormant? 2. Is there a formula that will find the largest numeric data entry in a row, column, array? Thankyou, Don- Re part 2 of your question =max(place range...

Excel VBA
Hi again, I have enclosed a timesheet which i want to break down the day activities by a percentage, so if my sheet says an activity took a hour then the day column would tell you percentage of a seven hou day. Also i want the date column date to change each day. Currently it work for one day but then the next day it changes all the above cells to th current date. I have attached the file Cheers Stev Attachment filename: book2.xls Download attachment: http://www.excelforum.com/attachment.php?postid=56396 -- Message posted from http://www.ExcelForum.com ...

Excel Templates #3
is anyone aware of a decent payroll timecard/timesheet template in Excel? Thanks. Have a look at the templates found here. http://office.microsoft.com/templates/category.aspx?CategoryID=CT063469961033&CTT=4&Origin=CT061993501033 Gord Dibben Excel MVP On Fri, 23 Jul 2004 16:26:49 -0700, "egcam@sbcglobal.net" <anonymous@discussions.microsoft.com> wrote: >is anyone aware of a decent payroll timecard/timesheet >template in Excel? Thanks. ...

Validation Confusion-Excel 2003
On a timesheet I need to ensure that when I enter in the times of a the DAY shift that it is on or after 6:00 am. The finish time is not important as the start time dictates the shift. For example, someone may start at 7:30 and work thro to 3:30 (or 15:50), this equals a day shift. I may have someone else who starts at 6:00 am and finishes at 10:00 am, this also equals a day shift. I also need an AFTERNOON shift that starts at 12:00 (Noon). I believe if I have the answer to the day, this will come easy to me (that is if the Noon time doesn't become a hinderance??) I also need ...

How do I create a database from an Excel form?
Hello Everybody - I need to see if Excel can be used to create a mailing list database from an Excel form. If so...how do I go about doing this? The list will need to include the name of the company, contact person, and address. Thanks in advance for all of your help! It is greatly appreciated! Here are a couple of links: http://www.mvps.org/dmcritchie/excel/mailmerg.htm http://www.mvps.org/word/FAQs/MailMerge The first is from David McRitchie and the second is by Beth Melton and Dave Rado. FIRESIGN98 wrote: > > Hello Everybody - > > I need to see if Excel can be used...

Problem with Excel add-in and .NET
I have developed an Excel add-in for a customer. The add-in enables users to retrieve data from a database by using WorkSheet functions defined in the xla file. The xla file has references to a .NET component (.dll). To be be able to use the component from Excel I have used regasm.exe to create a type library (tlb file) The User writes in a cell =Quote('31/12/2009';'MSFT') and Microsofts stock quote shows up. These functions are heavily used in a excel workbook. Since the spreadsheet is big and there's a lot of data to retrieve, it takes about 20 seconds to op...

which xml access type?
Hi, I'm developing an ASP.NET web app and i'm retrieving some data from xml files. My question is, if an xml file is going to be accessed a page is loaded, should i: 1. use an in-memory XmlDocument (created each time the page is accessed); or 2. use a forward-only XmlTextReader object (created each time the pages is accessed). Thanks very much in advance, Tim. If the XML file doesn't change frequently, and it's not a HUGE file, you should cache it programmatically with the Cache property on Page, set a dependency on the physical file (if it may change at all), and use...

Why Can't I Access Internet Links
I use Windows XP and IE 7 and suddenly one day I was unable to access internet links that were sent to me thru regular emails to my Microsoft Outlook. Any idea how to fix it? Thanks. What happens when you try? Any error messages? Hal -- Hal Hostetler, CPBE -- hhh@kvoa.com Senior Engineer/MIS -- MS MVP-Print/Imaging -- WA7BGX http://www.kvoa.com -- "When News breaks, we fix it!" KVOA Television, Tucson, AZ. NBC Channel 4 Live at Hot Licks - www.badnewsbluesband.com "amirstal" <amirstal@gmail.com> wrote in message news:d7decb35-157c-4438-82bd-24a2536d347f@m36g2...

can't access public folders with OWA
Hi, I have Windows Server 2003 and Exchange Server 2003 Installed everything works fine, except when trying to access Public folders via Outlook Web Access, after going to the location its asks for username and password - this works ok and the folder is displayed, but when trying to add a folder or post a note or do anything I get: You are not authorized to view this page You might not have permission to view this directory or page using the credentials you supplied. I have tested on client machines, remote machine and the exchange server as administrator with no luck. does anyone have any...

Corupt excel file ???
I have a excel file that seems to want to open, but then when it is done opening, There is no data or blank sheet. It goes though the possess and say's at the bottom ready opening but then there is nothing and the screen look's like I just opened Excel but no spread sheet. I then can go to file open another sheet and it works. (Not the one I wont) any body help. of coarse we don�t have a backup??? Email: bhogan@emediaofli.com --- Message posted from http://www.ExcelForum.com/ First, check to see if the file is actually loaded. Click on Window and see if it appears at the bottom o...

excel Xp (ofc XP)
.. I need to install an legacy application that will not install properly when ofc2k3 is the current application. Furthermore, the app wants small business tools for office 2k installed I can't uninstall ofc 2k3 because there are too many settings and applications depending on that possibly a naive questions: is it possible to make the ofc 2k3 look like ofcXp in terms of word and excel? is it possible to install small business tool from ofc 2k pro without destroying ofc2k3? Note that if office Xp or office 2k is the current office application, the legacy application will ins...

SBS2008
Have a customer who has a telephone system that uses an IMAP connectionj to the users Inbox to pick up voicemails. Since upgrading from Exchange 2003 (SBS2003) to Exchange 2007 (SBS2008) this has stopped working. Users userrnames and passwords are still the same. I've setup Outlook to make an IMAP connection to their mailbox but this doesn't appear to work, I guess this is why their telephone can't logon either. I just get a box come up prompting for a username and password ?? Is their more to it in Exchange 2007 than just doing the regular Outlook IMAP set...

IS there a way to compare 2 excel files
I like to be able to compare 2 excel files to see how different they are.Is there such a thing? Hi Now imagine how totally different two excel files can possibly be. The report would say ... ? But if you have two pretty similar sheets, try Myrna Larson and Bill Manville's "Compare", downloadable from http://www.cpearson.com/excel/download.htm HTH. Best wishes Harald "PeterM" <pmaston@comcast.net> skrev i melding news:%23BAzyBkOFHA.3940@TK2MSFTNGP12.phx.gbl... > I like to be able to compare 2 excel files to see how different they are.Is > there such a ...

Bug in Excel handling exponents
If I type -10^6 in a cell, the resulting number is 1,000,000. However, shouldn't the exponent take precedence over the sign? Specifically, shouldn't the result be -1,000,000? Search for "Precedence" in excel's Help. (I used xl2003.) And you'll find out how excel treats arithmetic operators. It's not what you learned in school. But those are excel's rules. So you have to play by them if you stay in excel. Personally, I'll add ()'s to make sure the expression evaluates like I want. Schizoid Man wrote: > > If I type -10^6 in a cell, t...

Import Excel Data from another workbook or file
Is there a way to import or export Excel Data between 2 different workbooks? E.G. Import from "File A" 'Sheet1' Column A, Row2 to "File B" 'Sheet1' Column A, Row 2. What I'd like to do ultimately is import data from 5 excel files into one. tamato43 wrote: || Is there a way to import or export Excel Data between 2 different || workbooks? || || E.G. Import from "File A" 'Sheet1' Column A, Row2 to "File B" || 'Sheet1' Column A, Row 2. || || What I'd like to do ultimately is import data from 5 excel files || in...

Deployment over Citrix not working in Access
pls see my post from yesterday below. Am I in the wrong group to get an answer on this? Thanks, Rob I have an application that I have developed with extensive support from this group. I just want to say thank you for all your help. Now, my app is deployed over a Citrix network and I keep having these weird things hapen: 1) on trying to add a record to a particular form (fsubDevices) I get the following msg: Error 3201 (you cannot add or change a record because a related record is required in table 'tblVisit.') in procedure cboDeviceLUno_AfterUpdate of VBA document Form_fsu...

Excel and Calendar Control 8.0
Enter an Excel worksheet. Click Insert, select Object and then, Calendar Control 8.0. Now, the Calendar is shown on the worksheet. And then, the worksheet operations is finished with the Calendar. Please say, how to remove the Calendar from the worksheet. Regards. ...

Access 2007 Runtime with OLE Object
I have form control bound to an OLE Object. The users are told to right click the OLE object on the form and make a reference by link, but the users are not able to right click on the OLE bound control when they are using 2007 Runtime. How can I allow the users to make a reference to an OLE Object when they are using 2007 Runtime? -- IT Guy From Arkansas Maybe there's another way .. is there a way to let the user browse to the location of the file and then put the location as a hyperlink in a table field? ...

Problems with Excel and User Capabilities
When I try to set up user accounts with access to only certain programs I run into a problem. We have installed MS Office v.X and I allow the applications Word, Powerpoint, and Excel to run. Word and Powerpoint run fine, but I get an error when starting Excel. When I start Excel up a window pops up saying "A unexpected error occurred while trying to load the Mircosoft Framework X library." I can hit OK and it returns to the program where everything seems to function normally. Has anyone else encountered this or have any advice? In article <#YTu5dWcDHA.2416@TK2MSFTNGP10....

How do I link multiple excel documents?
I need to link three Excel Documents into a master document that will reflect the data inputted into the others. as of right now they are all one document but that allows only one person at a time to enter the data, we need to have multiple people entering the data. Let's try for the easy solution first... Are people entering data on different worksheets, which are then captured on a 'master' sheet via equations? If so, open the file (make a backup copy first!), click on one of the input sheet tabs and select Move or Copy, then move the sheet into a New Workbook. Save th...

RFID Use with Access
I am looking to find the steps necessary to make Access ready to interface RFID information captured from passive RFID devices. I would appreciate anyone in the group sharing this how-to with me. Zachry1 <Zachry1@discussions.microsoft.com> wrote: >I am looking to find the steps necessary to make Access ready to interface >RFID information captured from passive RFID devices. You should really be looking to the vendor of the RFID capture devices. They should have DLLs/OCXs which you can install and sample code. VB 6 code usually works just fine in Access. Tony -- Tony Toews...

Mail Merge Excel Data with Publisher for 4 up postcards
Hi, I have been browsing and searching for help on this issue to no avail. What I am trying to do is mail merge a 2 sided 4 up postcard with my Excel 2003 data. On the front of Publisher 2003I have the Address Block which is no problem, however when I try to import the matching customer data to the back of the postcard it does not match up at all with the front. I have also 2 publisher files setup, 1 for the front of the postcard and 1 for the back. I know the Excel data has to be in this format for the mail merge to work correctly using this formula posted by Doug Robbins: =IF(MOD(A2,2)=1,A2...

Delete jpg file based on Access field contents
Hello, What would be the best way to have access delete a bunch of jpg's? I have two tables in mdb format, the main table has 36000 records. When I am done with a record, I move it to a Deleted Record table (using a query and a macro). There are about 1300 of the deleted records that have an associated jpg file. The file size is around 100k, so I have around 130 meg of files cluttering up my laptop. I will never look at the jpg's again. I know it's not a lot of space, but why not have some code get rid of them? So, should I use a button on a regularly accessed Fo...

Can Excel generate a 3-D scatter plot?
I want to generate surface plots of the form (x,y,f(x,y)). Should I just go buy MathCAD, or can Excel manage this? Hi Andy Pope has 'tricked' one: http://andypope.info/charts/3drotate.htm But you probably go for MathCad :-) -- Regards Frank Kabel Frankfurt, Germany "zzzfizz" <zzzfizz@discussions.microsoft.com> schrieb im Newsbeitrag news:BA2BEAB6-63E1-46E7-816F-B282C590C3D9@microsoft.com... > I want to generate surface plots of the form (x,y,f(x,y)). Should I just go > buy MathCAD, or can Excel manage this? ...