Recent content by cstahlberg

  1. C

    Exporting to Excel - Making graphs

    Chekc the table design of the tables you are exporting. I would imagine the fields that are getting the apostrophe are actually being exported as text, becasue they are formatted as text in the table design. You can simply change the format of the cell in the table design view from text to the...
  2. C

    Excel Spread sheet instead of report

    Try a button with code that looks like this: sub excelexport queryname = inputbox("What is the name of the query you want to import?") filelocation = inputbox("Where do you wan to put the file (path/fielname)?") DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel4, queryname...
  3. C

    Not in List Error

    I think you just need to change the vb to read strSQL = "Insert Into tblMakes ([Make]) values ('" & NewData & "')" instead of strSQL = "Insert Into tblMakes ([strMake]) values ('" & NewData & "')"
  4. C

    Export a report to excel

    If the DoCmd.OutputTo isn't working, I think you need to create an aplication object, open it and then begin writing your records in a do loop: You might need to check your references to use this code, along with others I have Microsoft Office DAO 3.6 selected... example code: Public Sub...
  5. C

    records grouping in a report

    When you set up the report in the wizard, make sure you include field 2 as the group level. The report wizard will set everything up for you. Then when you get to the actual report, drag the textbox for field 2 from the portion of the form labelled 'Field 2 header' and put it into the form...
  6. C

    CSV Auto Import

    I have done something similar where I call an input box and then use the value as the location for the transfertext e.g.: sub temp path = inputbox("Where is the file?") DoCmd.TransferText acImportDelim, , "newtable", path, True end sub
  7. C

    Using a variable twice

    Do you set up your queries in code? if so, you can simply prompt the user with a text box on an open event and get the value for year and then, using that, incorporate the value into the query language: e.g. sub Report_open dim qdf as querydef dim yearval as integer yearval =...
  8. C

    Order by date, while staying grouped by name

    two queries First you want to create a query to pull the minimum date by each production: sql1 = "Select production, min(date) as mindate into mytable2 from [mytable]" sql2 = "SELECT mytable.Production, mytable.Date, mytable.Name FROM mytable2 INNER JOIN mytable ON mytable2.Production =...
  9. C

    Exporting RTF with FilterOn

    I have an application which creates reports with upwards of 500 single record pages. I want to have a menu option to export only the page being displyed to a .rtf (as opposed to all 500 pages). My current thinking is to set a filter, run the DoCmd.OutputTo and then remove the filter. The...
Back
Top Bottom