Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. 13badar

    Access 2002/Running Macro using VB/Transfer Spreadsheet/Range

    Thank you guys for your helpful hints. I am going to rerun the whole thing and see where the value of the service area is changing. As far as the Excel file being left open, I think If I use On Error Resume Next it'll eliminate the problem since it'll goto the line where It says: xwb.Close xl.Quit
  2. 13badar

    Access 2002/Running Macro using VB/Transfer Spreadsheet/Range

    Well, The first Service Area in the MSA_SA list was "Capital SA" so, the first worksheet was named "Capital SA RENEWAL". Then MSA_SA took on the 2nd value as the MSA_SA "Central SA" so, the worksheet would be "MSA_SA RENEWAL" or "Central SA RENEWAL" So, I really dont know what the problem is OR...
  3. 13badar

    Access 2002/Running Macro using VB/Transfer Spreadsheet/Range

    Hi PHV, I was checking everything if it works. It does with the new rs declaration. I am getting the subscript out of range error for this line: Run-time error '9': Subscript out of range highlighted line: Set xws = xwb.Sheets(ServiceArea) I already created an Excel file 'PATH' with titles for...
  4. 13badar

    Access 2002/Running Macro using VB/Transfer Spreadsheet/Range

    I get the following error when I run the code above: Run-time error '13': Type Mismatch. The highlighted line: Set rs = db.OpenRecordset(ServiceArea)
  5. 13badar

    Access 2002/Running Macro using VB/Transfer Spreadsheet/Range

    Here's what my whole code looks like: Option Compare Database Private Sub cmdExport_Click() Dim ReportType As String Dim Path As String Dim BegDate As Date Dim EndDate As Date Dim SQL As String Dim db As Database Dim MSA_ARRAY Dim MSA_SA Dim ServiceArea As String Dim xl As New...
  6. 13badar

    Access 2002/Running Macro using VB/Transfer Spreadsheet/Range

    I want to start outputting Tables to Excel on the 3rd line i.e. A3. Is there no other way that I can do that?? The reason I'm doing this is because I am adding a TOTALS line in the begining in the Excel Template I'm saving the Access Tables into. The TOTALS line is in the begining (A2:P50)...
  7. 13badar

    Access 2002/Running Macro using VB/Transfer Spreadsheet/Range

    I tried using Quotes instead: "B8:H50" It gives me the following error: Run-time Error'3673': This table contains cells that are outside the range of cells defined in this spreadsheet. I really need to paste the Table on the 8th line down in the Excel Spreadsheet. Also, my data is static. Thats...
  8. 13badar

    Access 2002/Running Macro using VB/Transfer Spreadsheet/Range

    Hello, I am trying to run this TRANSFER SPREADSHEET macro, but I think my syntax is wrong in the end for the RANGE option: Path = txtPath.Value DoCmd.TransferSpreadsheet acExport, , MSA_SA & " RENEWAL", "" & Path & "", True, (B8:H50)
  9. 13badar

    How do I Comment Out a large portion of VBA Code?

    Another way to do this is: GoTo 2 -- ---code ----code ---code -- 2 It'll skip all other lines and start from the line that says 2.
  10. 13badar

    Help Needed to Format Field in Access Table

    GOTO Design View of the Table On the Top Half of your screen, U'll see a list of Your Table Fields alongwith their respective DataTypes on the RHS. After Selecting Number, On the bottom half of the screen, there are GENERAL properties. Just pick Decimal Places '2' instead of AUTO. Do the same...
  11. 13badar

    Using DCOUNT in ACCESS 2002 VBA

    Thanx Zion7 for your help. I've a Question: I have this Array: MSA_ARRAY = Array("Altamont", "Bayfung", "SilverCreek" _ "Blossom", "CanyonLakes", "Valle", "EdenPalms") I want to call values from a cloumn named "SA" from a Table named "tblRegion". What should be the Syntax for that. MSA_ARRAY...
  12. 13badar

    Using DCOUNT in ACCESS 2002 VBA

    Hi, I wanted to save the following Query, but only wanted to save Queries with Data in them since some of these Queries will have no Data in them. I wanted to save the Queries with DATA in them. Could you let me know what Argument should I be using in my DCount Statement?? SQL = "SELECT A.CID...
  13. 13badar

    Access 2002, "Loop" in VBA to save Query in Excel

    Thanx, It does return only the Queries that have Data in them. However, I wanted to return all the Branches in the Region ("Report"). Not just the Filled Ones. If I am selecting Region "Emory" from the Report Combo Box, I want to return all the Branches that are present in that Region, "Data or...
  14. 13badar

    Access 2002, "Loop" in VBA to save Query in Excel

    OK PHV, it is working now. All of the Branches saved. One problem: It is saving all of the Branches, even the ones that aren't in the cboReport.Value. cboReport.Value have three REGIONS: Emory, Large, Woodside. There is more than one branch that lies within these regions. The Tbl1 I used in...
  15. 13badar

    Access 2002, "Loop" in VBA to save Query in Excel

    What's MSA_Branch Do I have to Actually type in Each Branch Name to do this?? Also, just wanted to mention, earlier Code works to the point that it saves the Query alright with all the fields of the table that I wanted, its just empty. Also, the excel file is also populated with different...
  16. 13badar

    Access 2002, "Loop" in VBA to save Query in Excel

    yeah the Path is basically: C:\Documents and Settings\Badar\Desktop\Reports.xls I want to save all Branches Info. into the same Excel File named "Reports.xls". In that File, There will be separate Worksheets, with each Worksheet named the actual name of BranchName, which comes from Tbl1 as a...
  17. 13badar

    Access 2002, "Loop" in VBA to save Query in Excel

    The following command button when clicked, saves the Query in Access and exports that Query to Excel. I get a Run-Time Error '424' "Object Required". I set A.BranchName as MSA_ARRAY(Iteration).Name BranchName is what I want to pull from the Main SQL Query and save it as an Excel Worksheet with...
  18. 13badar

    Access 2002, Running & Saving an SQL Query in VBA

    The following command button when clicked, saves the Query in Access and exports that Query to Excel. I get a Run-Time Error '424' "Object Required". I set A.BranchName as MSA_ARRAY(Iteration).Name BranchName is what I want to pull from the Main SQL Query and save it as an Excel Worksheet with...
  19. 13badar

    Access 2002, Running & Saving an SQL Query in VBA

    sorry sorry,...i was testing the statement in a wrong CMD Click Function, :) o' It works. Still confused as to Why U put True instead of answering the three other options at the end of the statement.
  20. 13badar

    Access 2002, Running & Saving an SQL Query in VBA

    Even this statement doesnt work: DoCmd.TransferSpreadsheet acExport, , BranchName & "_0" & Month & " Query", _ "C:\Documents and Settings\Desktop\OUTPUT\Query.xls", True

Part and Inventory Search

Back
Top