473,326 Members | 2,111 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Access VBA Code To Append 10 Queries Into 1 Excel Tab

I have very little experience with Access VBA so I'm hoping you can help me. I have an access 2010 database setup as follows:

4 tables linked to other access databases
A union qry (qry_all) linking the above 4 tables
A select query based off above union query (qry_all_calcs) with calculated fields.

The data will be updated/added weekly until the end of the year. there are currently about 900,000 records. I want to link the last query to an excel file (for a report) but it's too much data. However, I have 10 select queries with a criteria of office location (eg qry_atlanta, qry_dallas, qry_new york) that run off the qry_all_calcs - those do succesfully run and link to excel.

as a work around i'd like to create code that will append the data from the 10 location queries to 1 tab in an excel workbook. when the vba code is run it should delete all data in the tab first.

I'm just beginning to learn vba but I'm not a programmer so I'd really appreciate as much detail with code as possible.
Oct 30 '13 #1
26 3613
ADezii
8,834 Expert 8TB
  1. You ask for much Detail, but you provide little.
  2. How many Fields are there in the Location Queries?
  3. Are these Fiels static for each Query?
  4. Post the SQL for a Location Query.
  5. All Data on Worksheet to be Deleted prior to move?
  6. Is this essentially an Append of Data from 10 Queries to an single Excel Spreadsheet?
  7. etc...
Oct 30 '13 #2
@ADezii
1. About 75 fields in the location queries
2. Yes the fields are static. Each query is based off of the same data source (qry_all_calcs) with 1 criteria - location
3. Yes, all data on worksheet to be deleted prior to copying the data from the 10 queries (mentioned in original post)
4. This is an append of each query into one worksheet (mentioned in original post).

It's alot to display the sql of 75 fields. The 10 select queries originally mentioned are literally just a select query with 1 criteria - the location. Thank you.
Oct 30 '13 #3
ADezii
8,834 Expert 8TB
Off the top of my head, the only way of accomplishing this would be via a combination of Recordset Programming/Excel Automation Code. With limited VBA experience on your part, this may be a little challenging. If you want me to proceed, I'll see what I can come up with...
Oct 30 '13 #4
ADezii
8,834 Expert 8TB
I have arrived at what I feel is a relatively simple, efficient response to your question. The Logic works great on small Recordsets but on 10 large Recordsets is a totally different story. I've tested my Version and it works well. Everything that I arrived at will be posted below:
  1. Create a Default Excel Workbook and Save it in the 'same' Folder as your Database. Name it Locations.xls.
  2. Preface all 10 of your Location Queries with 'qryLoc' as in: qryLocRegionA, qryLocRegionB, etc.
  3. Set a Reference to the Microsoft Excel XX.X Object Library.
  4. Execute the following Code:
    Expand|Select|Wrap|Line Numbers
    1. Dim appExcel As Excel.Application
    2. Dim rst As DAO.Recordset
    3. Dim MyDB As DAO.Database
    4. Dim qdf  As QueryDef
    5. Dim intNumOfLocQueries As Integer
    6. Dim intNextRow As Integer
    7.  
    8. 'Make sure to Set a Reference to the Microsoft Excel XX.X Object Library
    9. Set MyDB = CurrentDb
    10. Set appExcel = CreateObject("Excel.Application")
    11.  
    12. With appExcel
    13.   .Visible = True
    14.   .UserControl = True
    15.     With .Workbooks.Open(CurrentProject.Path & "\Locations.xls")
    16.      .Worksheets("Sheet1").Activate
    17.         For Each qdf In CurrentDb.QueryDefs
    18.           If Left$(qdf.Name, 6) = "qryLoc" Then
    19.             intNumOfLocQueries = intNumOfLocQueries + 1
    20.               If intNumOfLocQueries = 1 Then
    21.                 Set rst = MyDB.OpenRecordset(qdf.Name)
    22.                   .Worksheets("Sheet1").Range("A1").CopyFromRecordset rst
    23.                     intNextRow = .ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell).Row + 1
    24.               Else
    25.                 Set rst = MyDB.OpenRecordset(qdf.Name)
    26.                   .Worksheets("Sheet1").Range("A" & CStr(intNextRow)).CopyFromRecordset rst
    27.                     intNextRow = .ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell).Row + 1
    28.               End If
    29.           End If
    30.         Next qdf
    31.     End With
    32. End With
    33.  
    34. rst.Close
    35.  
    36. Set rst = Nothing
    37. Set appExcel = Nothing
    38. Set qdf = Nothing
    39. Set qdf = Nothing
    40.  
  5. This Code will:
    1. Make the required Variable Declarations.
    2. Set References to the Excel Application Object as well as the Current Database.
    3. Set a couple Properties of the Excel Application.
    4. Open the Workbook you previously created (CurrentProject.Path & "\Locations.xls")
    5. Activate Sheet1.
    6. Loop thru all Querys in the Current Database and if they are prefaced with qryLoc, create a Recordset based on that specific Query.
    7. If it is the 1st Location Query, Copy the Recordset starting at Sheet1!A1.
    8. If it is not the 1st Query, then repeat the process but Copy the Recordset starting at Column A!Last Row With Data + 1.
    9. Close the Recordset and release Memory that was assigned to Object Variables.
  6. Good Luck - any questions, feel free to ask.
Oct 31 '13 #5
Thank you SO much!! I am planning to work on this tomorrow afternoon. Thank you for all of the detail!!
Oct 31 '13 #6
ADezii
8,834 Expert 8TB
You are quite welcome, let me know how you make out.
Oct 31 '13 #7
Hi adezii. I started looking at your code/notes this afternoon & began setting things up. I got pulled away to something else though. I plan to pick this up tomorrow though. Thank you again!
Oct 31 '13 #8
hi adezii. The code did run for the 1st 2 queries, thank you!! But I think you are right - it may be too much for all of the data. The code opened the excel workbook & copied in the data from the first 2 queries (88,000 records). however, the code then hangs & switching back to VB the message displayed: Run Time Error 6 Overflow. There are about 66,000 records in the 3rd query. Pressing Debug highlights the below line of code.

Expand|Select|Wrap|Line Numbers
  1. intNextRow = .ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell).Row + 1
Here is other code that works for 1 hard coded query. I don't know if it would help to combine the code somehow with your code. I truly appreciate your help because at this point my knowledge is so limited...

Expand|Select|Wrap|Line Numbers
  1. Sub ExportData()
  2. Dim wbDest As Excel.workbook
  3. Dim wsDest As Excel.worksheet
  4. Dim rsSrc As DAO.Recordset
  5. Dim i As Integer
  6.  
  7. 'open your workbook using a set wbdest = statement
  8.  
  9. Set wbDest = Excel.Application.Workbooks.Open("D:\Temp\test2.xlsx", False, False)
  10. Set wsDest = wbDest.Worksheets("Sheet1")
  11.  
  12. Set rsSrc = CurrentDb.OpenRecordset("qryLOC_CA")
  13.  
  14. For i = 1 To rsSrc.Fields.Count
  15. wsDest.Cells(1, i) = rsSrc.Fields(i - 1)
  16. Next i
  17.  
  18. wsDest.Range("A2").CopyFromRecordset rsSrc
  19.  
  20. wbDest.Save
  21.  
  22. End Sub
Nov 1 '13 #9
ADezii
8,834 Expert 8TB
  1. The Overflow Error is because of the variable Declaration as INTEGER which has now been changed to LONG (Line# 6).
  2. There were a couple of Bugs which hopefully I fixed in the Revised Code below.
  3. You can now specifiy which Sheet to Output the Data to, simply change the Value of the CONSTANT conSheet (Line# 7).
  4. Until this is fully operational, no existing Data on the Sheet will be DELETED, it has been Remmed Out in the Test Database (Line# 17 for 1,000 Records).
  5. Because of the nature of this Thread, I am attaching the Test Database that I created using 1,000 Rows. Click the Command Button and see what happens.
  6. The Test Database allows for 12 Worksheets Sheet1...Sheet12.
  7. Make sure that Locations.xls is in the 'same' Folder as the Database.
  8. Let me know how you make out.
    Expand|Select|Wrap|Line Numbers
    1. Dim appExcel As Excel.Application
    2. Dim rst As DAO.Recordset
    3. Dim MyDB As DAO.Database
    4. Dim qdf  As QueryDef
    5. Dim intNumOfLocQueries As Integer
    6. Dim lngNextRow As Long
    7. Const conSHEET As String = "Sheet7"
    8.  
    9. 'Make sure to Set a Reference to the Microsoft Excel XX.X Object Library
    10. Set MyDB = CurrentDb
    11. Set appExcel = CreateObject("Excel.Application")
    12.  
    13. With appExcel
    14.   .Visible = True
    15.   .UserControl = True
    16.     With .Workbooks.Open(CurrentProject.Path & "\Locations.xls")
    17.      '.Worksheets(conSHEET).Range("A1:CB1000").ClearContents   '80 Columns/1,000 Rows
    18.      .Worksheets(conSHEET).Activate
    19.         For Each qdf In CurrentDb.QueryDefs
    20.           If Left$(qdf.Name, 6) = "qryLoc" Then
    21.             intNumOfLocQueries = intNumOfLocQueries + 1
    22.               If intNumOfLocQueries = 1 Then
    23.                 Set rst = MyDB.OpenRecordset(qdf.Name)
    24.                  lngNextRow = DCount("*", qdf.Name) + 1
    25.                  'lngNextRow = .ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell).Row + 1
    26.                   .Worksheets(conSHEET).Range("A1").CopyFromRecordset rst
    27.               Else
    28.                 Set rst = MyDB.OpenRecordset(qdf.Name)
    29.                   .Worksheets(conSHEET).Range("A" & CStr(lngNextRow)).CopyFromRecordset rst
    30.                     lngNextRow = lngNextRow + DCount("*", qdf.Name)
    31.                     'lngNextRow = .ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell).Row + 1
    32.               End If
    33.           End If
    34.         Next qdf
    35.     End With
    36. End With
    37.  
    38. rst.Close
    39.  
    40. Set rst = Nothing
    41. Set appExcel = Nothing
    42. Set qdf = Nothing
    43. Set qdf = Nothing
    44.  
Attached Files
File Type: zip CopyFromRecordset.zip (75.2 KB, 131 views)
Nov 1 '13 #10
Hi Adezii. Thank you, this code ran successfully!!! All of the records were appended to the 1 tab which is what I need. And thank you for your sample database!

I ran 7 of my 12 queries and got about 487,000 records. It took about 35 mins to run. A message displayed a couple of minutes into the process that said ”You selected more records than can be copied onto the clipboard at one time….”. I clicked ok but I do see the correct number of records were pulled (we’re using office 2010).

I’m sorry to bother you, but do you think it is possible to append the data to the excel file without actually opening the Excel file? I truly due appreciate your help and your time and certainly understand if this is asking too much. Thanks again.
Nov 1 '13 #11
ADezii
8,834 Expert 8TB
The following changes to Lines 14 and 38 will do the trick for you and actually Prompt you to Save any changes or not.
Expand|Select|Wrap|Line Numbers
  1. Dim appExcel As Excel.Application
  2. Dim rst As DAO.Recordset
  3. Dim MyDB As DAO.Database
  4. Dim qdf  As QueryDef
  5. Dim intNumOfLocQueries As Integer
  6. Dim lngNextRow As Long
  7. Const conSHEET As String = "Sheet7"
  8.  
  9. 'Make sure to Set a Reference to the Microsoft Excel XX.X Object Library
  10. Set MyDB = CurrentDb
  11. Set appExcel = CreateObject("Excel.Application")
  12.  
  13. With appExcel
  14.   .Visible = False
  15.   .UserControl = True
  16.     With .Workbooks.Open(CurrentProject.Path & "\Locations.xls")
  17.      '.Worksheets(conSHEET).Range("A1:CB1000").ClearContents   '80 Columns/1,000 Rows
  18.      .Worksheets(conSHEET).Activate
  19.         For Each qdf In CurrentDb.QueryDefs
  20.           If Left$(qdf.Name, 6) = "qryLoc" Then
  21.             intNumOfLocQueries = intNumOfLocQueries + 1
  22.               If intNumOfLocQueries = 1 Then
  23.                 Set rst = MyDB.OpenRecordset(qdf.Name)
  24.                  lngNextRow = DCount("*", qdf.Name) + 1
  25.                  'lngNextRow = .ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell).Row + 1
  26.                   .Worksheets(conSHEET).Range("A1").CopyFromRecordset rst
  27.               Else
  28.                 Set rst = MyDB.OpenRecordset(qdf.Name)
  29.                   .Worksheets(conSHEET).Range("A" & CStr(lngNextRow)).CopyFromRecordset rst
  30.                     lngNextRow = lngNextRow + DCount("*", qdf.Name)
  31.                     'lngNextRow = .ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell).Row + 1
  32.               End If
  33.           End If
  34.         Next qdf
  35.     End With
  36. End With
  37.  
  38. appExcel.Workbooks.Close
  39.  
  40. rst.Close
  41.  
  42. Set rst = Nothing
  43. Set appExcel = Nothing
  44. Set qdf = Nothing
  45. Set qdf = Nothing
  46.  
Nov 2 '13 #12
Thank you VERY much for your help!! When I ran the code, it seems to just run for awhile. After about 1 hour I used End Task to kill the process. A vb error displayed: Run-time error 1004, Method ‘Close’ of object ‘Workbooks’ failed and the line appExcel.Workbooks.Close was highlighted. I tried looking online to see if I could figure out how to tweak the code but it seemed right to me (but I wasn’t able to spend a lot of time looking). Any help is greatly appreciated…
Nov 4 '13 #13
ADezii
8,834 Expert 8TB
You can try:
Expand|Select|Wrap|Line Numbers
  1. appExcel.Workbooks(CurrentProject.Path & "\Locations.xls").Close SaveChanges:=True
Nov 5 '13 #14
thank you adezii! I hit a very busy period at work. hopefully i can try this tomorrow.
Nov 7 '13 #15
Hi Adezii. when running the new code an error displays, Run-Time Error 9 Subscript out of Range. Clicking on debug highlights the new line of code. Thank you so much again for the help that you've provided. I'm posting the current code below:

Expand|Select|Wrap|Line Numbers
  1. Sub ExportData()
  2.  
  3. Dim appExcel As Excel.Application
  4. Dim rst As DAO.Recordset
  5. Dim MyDB As DAO.Database
  6. Dim qdf  As QueryDef
  7. Dim intNumOfLocQueries As Integer
  8. Dim lngNextRow As Long
  9. Const conSHEET As String = "Sheet1"
  10.  
  11. 'Make sure to Set a Reference to the Microsoft Excel XX.X Object Library
  12. Set MyDB = CurrentDb
  13. Set appExcel = CreateObject("Excel.Application")
  14.  
  15. With appExcel
  16.   .Visible = False
  17.   .UserControl = True
  18.     With .Workbooks.Open(CurrentProject.Path & "\Locations2.xlsx")
  19.      '.Worksheets(conSHEET).Range("A1:CB1000").ClearContents   '80 Columns/1,000 Rows
  20.      .Worksheets(conSHEET).Activate
  21.         For Each qdf In CurrentDb.QueryDefs
  22.           If Left$(qdf.Name, 6) = "qryLoc" Then
  23.             intNumOfLocQueries = intNumOfLocQueries + 1
  24.               If intNumOfLocQueries = 1 Then
  25.                 Set rst = MyDB.OpenRecordset(qdf.Name)
  26.                  lngNextRow = DCount("*", qdf.Name) + 1
  27.                  'lngNextRow = .ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell).Row + 1
  28.                   .Worksheets(conSHEET).Range("A1").CopyFromRecordset rst
  29.               Else
  30.                 Set rst = MyDB.OpenRecordset(qdf.Name)
  31.                   .Worksheets(conSHEET).Range("A" & CStr(lngNextRow)).CopyFromRecordset rst
  32.                     lngNextRow = lngNextRow + DCount("*", qdf.Name)
  33.                     'lngNextRow = .ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell).Row + 1
  34.               End If
  35.           End If
  36.         Next qdf
  37.     End With
  38. End With
  39.  
  40. appExcel.Workbooks(CurrentProject.Path & "\Locations.xlsx").Close SaveChanges:=True
  41.  
  42.  
  43. rst.Close
  44.  
  45. Set rst = Nothing
  46. Set appExcel = Nothing
  47. Set qdf = Nothing
  48. Set qdf = Nothing
  49.  
  50.  
  51. End Sub
Nov 12 '13 #16
ADezii
8,834 Expert 8TB
  1. In Code Line# 18 you are Opening Locations2.xlsx, as in:
    Expand|Select|Wrap|Line Numbers
    1. With .Workbooks.Open(CurrentProject.Path & "\Locations2.xlsx")
  2. In Code Line# 40 you are Closing Locations.xlsx, as in:
    Expand|Select|Wrap|Line Numbers
    1. appExcel.Workbooks(CurrentProject.Path & "\Locations.xlsx").Close SaveChanges:=True 
    2.  
  3. Filenames must match exactly:
    Expand|Select|Wrap|Line Numbers
    1. Locations2.xlsx <> Locations.xlsx
Nov 12 '13 #17
Oh that was a stupid error, my apologies. i fixed that, re-ran & got same error. i try to open the excel file. I get the msg it's already open & re-opening will loose my changes. I answer No & I do see all the data from the 3 queries i setup. I've attached latest code again. many, many thanks.

Expand|Select|Wrap|Line Numbers
  1. Sub ExportData()
  2.  
  3. Dim appExcel As Excel.Application
  4. Dim rst As DAO.Recordset
  5. Dim MyDB As DAO.Database
  6. Dim qdf  As QueryDef
  7. Dim intNumOfLocQueries As Integer
  8. Dim lngNextRow As Long
  9. Const conSHEET As String = "Sheet1"
  10.  
  11. 'Make sure to Set a Reference to the Microsoft Excel XX.X Object Library
  12. Set MyDB = CurrentDb
  13. Set appExcel = CreateObject("Excel.Application")
  14.  
  15. With appExcel
  16.   .Visible = False
  17.   .UserControl = True
  18.     With .Workbooks.Open(CurrentProject.Path & "\Locations2.xlsx")
  19.      '.Worksheets(conSHEET).Range("A1:CB1000").ClearContents   '80 Columns/1,000 Rows
  20.      .Worksheets(conSHEET).Activate
  21.         For Each qdf In CurrentDb.QueryDefs
  22.           If Left$(qdf.Name, 6) = "qryLoc" Then
  23.             intNumOfLocQueries = intNumOfLocQueries + 1
  24.               If intNumOfLocQueries = 1 Then
  25.                 Set rst = MyDB.OpenRecordset(qdf.Name)
  26.                  lngNextRow = DCount("*", qdf.Name) + 1
  27.                  'lngNextRow = .ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell).Row + 1
  28.                   .Worksheets(conSHEET).Range("A1").CopyFromRecordset rst
  29.               Else
  30.                 Set rst = MyDB.OpenRecordset(qdf.Name)
  31.                   .Worksheets(conSHEET).Range("A" & CStr(lngNextRow)).CopyFromRecordset rst
  32.                     lngNextRow = lngNextRow + DCount("*", qdf.Name)
  33.                     'lngNextRow = .ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell).Row + 1
  34.               End If
  35.           End If
  36.         Next qdf
  37.     End With
  38. End With
  39.  
  40. appExcel.Workbooks(CurrentProject.Path & "\Locations2.xlsx").Close SaveChanges:=True
  41.  
  42.  
  43. rst.Close
  44.  
  45. Set rst = Nothing
  46. Set appExcel = Nothing
  47. Set qdf = Nothing
  48. Set qdf = Nothing
  49.  
  50.  
  51. End Sub
Nov 12 '13 #18
ADezii
8,834 Expert 8TB
Set Code Line#16 = True
Expand|Select|Wrap|Line Numbers
  1. .Visible = True
and do not execute Code line# 40 (REM the Line)
Expand|Select|Wrap|Line Numbers
  1. 'appExcel.Workbooks(CurrentProject.Path & "\Locations2.xlsx").Close SaveChanges:=True
Let me know what happens.
Nov 12 '13 #19
Thank you ADezii, this worked and I didn't wait very long, less than 10 mins. i just have 3 queries setup as a test which returned about 200,000 records in excel. The application window remained open (that must be the change in line 16), does not close but i can work with that.

Is there a way to pull the header row into excel? extra headers from each query is ok because the code will filter the data by location name. Thank you again for your time.
Nov 19 '13 #20
ADezii
8,834 Expert 8TB
Is there a way to pull the header row into excel?
Not exactly sure what you mean. Are you asking to Post the Field Names for each Query to the Worksheet?
Nov 19 '13 #21
yes, thank you, it would be helpful to have the field names from the query (eg, week ending date, office location, emp name, emp ID, etc...) pulled in as the first row in the excel file as the VB code pulls data based on those field names. What i was trying to say was that if it was easier programatically to include that header row from every query, that would not cause a problem with our code/reports. As always, i am very thankful for your help...
Nov 21 '13 #22
ADezii
8,834 Expert 8TB
I'll base my Reply partially on the Attachment that I previously sent to you.
  1. Once you have defined your Query within the For...Each Loop, and created a Recordset based on it (Line# 6), you must figure out the Number of Fields in the Query. This only needs to be performed once in the 1st Loop Iteration (Line#s 7 and 8).
  2. Copy the Field Names to the appropriate Row, in this case (1st Query) Row 1 (Line# 9).
  3. The Row Counter (intRowCtr) now needs to be incremented by 2, accounting for the Header in each Query (Line# 11).
  4. Copy the actual Data for the Query, in the 1st Query, starting from Cell 'A2' (Line# 13).
  5. Repeat this process after the Else Clause after (Line# 14).
Expand|Select|Wrap|Line Numbers
  1. '******************* Code intentionally omitted *******************
  2.         For Each qdf In CurrentDb.QueryDefs
  3.           If Left$(qdf.Name, 6) = "qryLoc" Then
  4.             intNumOfLocQueries = intNumOfLocQueries + 1
  5.               If intNumOfLocQueries = 1 Then
  6.                 Set rst = MyDB.OpenRecordset(qdf.Name)
  7.                   Dim intCtr As Integer
  8.                   For intCtr = 0 To rst.Fields.Count - 1
  9.                     .Worksheets(conSHEET).Cells(1, (intCtr + 1)) = rst.Fields(intCtr).Name
  10.                   Next
  11.                    lngNextRow = DCount("*", qdf.Name) + 2
  12.                      'lngNextRow = .ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell).Row + 1
  13.                      .Worksheets(conSHEET).Range("A2").CopyFromRecordset rst
  14.               Else
  15. '******************* Code intentionally omitted *******************
Nov 21 '13 #23
Thank you very much ADezzi, the eaders came into the excel file! Thanks so much for all of your help. Now unfortunately I'm seeing that the criteria for the queries ((qdf.Name, 6) = "qryLoc" )will not work because there are several other query names that start w/the same first 6 characters that do not filter by location. These queries are used early on in the process & build upon each other (this db was not created by me). i was hoping i could change those query names but they are referenced in many different places. Is it possible to put the necessary query names in a table & have a variable pull the query names from the table? You've spent alot of time on this one question & I certainly understand if it's too much to help with this. Thanks for all the time you've used & the clear, detailed answers you've provided.
Nov 22 '13 #24
ADezii
8,834 Expert 8TB
Is it possible to put the necessary query names in a table & have a variable pull the query names from the table?
  1. Place all your Query Names to process in a Table.
  2. Create a Recordset based on that Table with a single Field only.
  3. Loop through this Recordset processing each Query Name in turn.
  4. Give it a shot, and if you are stuck, let me know.
  5. BTW, I give you a lot of credit, you are taking on a rather large Project for an 'Access Nubie'.
Nov 22 '13 #25
Thank you so much ADezii i'll take a stab at it. And thanks very much for the word of encouragement. I guess at this point i feel more comfortable with Access than VBA. If you have any VBA intro books, websites or online courses you'd recommend I'd appreciate it. Thanks again!
Nov 22 '13 #26
ADezii
8,834 Expert 8TB
@bytes access nubie
You are quite welcome. Give it a shot, and if you are still having problems, let us know.
Nov 23 '13 #27

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: JMCN | last post by:
hi i need some advice on whether if it would be better to use an append query or an update query. here is the situation, i have linked another database table to my current database. then i...
5
by: Barn Yard | last post by:
good morning, im still kind of new to VBA but I have learned some interesting things so far. Right now I am normalizing my survey database so I'm having to run an append query for each...
1
by: Rocky A | last post by:
I need to open an excel workbook and import info to my access program. That isn't the problem, I've got the code down for doing what I want to do. I'm declaring the variable and setting it like...
1
by: Kristina | last post by:
I'm trying to run multiple append queries in an Access front end that append data from tables in a .mdb into tables in SQL Server 2000. My Access front end has a link to both tables, the .mdb and...
3
by: Mads Petersen | last post by:
I'm stuck in this code. Hope you can and will help me. I launch it from excel. I have made the following code work, but not as i whant. I need the ranges to be working with something like xlDown....
1
by: Omar Anwar | last post by:
Can any one provide link in which the append queries are explained in detail. i will be greatful.
7
by: Henrootje | last post by:
I have to run a lot of append queries. I have data in tables in old databases that has to be appended to tables in a new database. I made a new database in which I linked the old tables and the...
0
by: sandervanee | last post by:
Hello, I am trying to export several Access 2003 select queries to Excel 2003 using an Access macro. I'm using the macro command "TransferSpreadsheet" to export the queries. This going quit well,...
3
by: bazdaa | last post by:
Access 2K3 Append/Update ignore non null cells! Hi, I have been tasked with completing an audit of approximately 10,000 items, to which I have generated a list of 40 questions (fields) for...
2
by: eko99312 | last post by:
Dear All, As you know that input data on excel is easy than access, you can simple click the date that you prefer and input the value that you want. For example : Consider that the month that I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.