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 Mike Lewis 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. skyline16

    Using a union query to create a Select All option in a combo box

    WHERE ((([tbl_LIST OF CREWS].TRADE)=[Forms]![frm_select_trade]![cboTrade]) AND (([OMNIS_f_Job_Library].FO_JOB_CODE)=[Forms]![frm_supervisor_sort]![cboTASKCODE])) OR ([Forms]![frm_supervisor_sort]![cboTASKCODE]="*") This returns all task codes when * is selected in cboTASKCODE, but it also...
  2. skyline16

    Using a union query to create a Select All option in a combo box

    The union query is the Row Source of the combo box (cboTASKCODE)in a form (frm_supervisor_sort). Not sure what to tell you about ODBC tables. When Like"*" is typed manually into the criteria, the correct records are returned. Sorry the SQL view is so long. The fields come from several...
  3. skyline16

    Using a union query to create a Select All option in a combo box

    I am attempting to create a select all option in a combo box. I have created a union query with the following code: SELECT "*" AS Task_Code, "(All)" AS Description, "(All)" AS Trade FROM tbl_Taskcode UNION SELECT tbl_Taskcode.Task_code, tbl_Taskcode.Description, tbl_Taskcode.Trade FROM...
  4. skyline16

    Sending Access Query Results to Excel

    Can you not have a parameter in the recordset? I have the form open and the 'Trade' selected in the combo box (cboTrade). Both queries work properly as long as the frm_select_trade is open and a trade has been selected.
  5. skyline16

    Sending Access Query Results to Excel

    It's really long. SELECT [OMNIS_f_WorkOrder].[WO_NUMBER], [OMNIS_f_WorkOrder].[WO_ACT_REQ], [OMNIS_f_WorkOrder].[WO_REQUEST_DATE], [OMNIS_f_WorkOrder].[WO_TYPE_CODE], [OMNIS_f_WorkOrder].[WO_STATUS], [OMNIS_f_WorkOrder].[WO_CLOSE_DATE], [tbl_PRIORITY].[New_Priority]...
  6. skyline16

    Sending Access Query Results to Excel

    Private Const conQuery = "SELECT Count(qry_planning_report.WO_NUMBER)AS CountOfWO_NUMBER, qry_planning_report.FU_BLDGCODE_DUP FROM qry_planning_report GROUP BY qry_planning_report.FU_BLDGCODE_DUP ORDER BY Count(qry_planning_report.WO_NUMBER) DESC;" Now the error message says: "No value given...
  7. skyline16

    Sending Access Query Results to Excel

    Do I copy the SQL code of qry_count_buildingcode and paste it into the module?
  8. skyline16

    Sending Access Query Results to Excel

    Private Const conQuery = "qry_count_buildingcode" The error message says: "Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDUERE', 'SELECT' OR 'INSERT'
  9. skyline16

    Sending Access Query Results to Excel

    I have a query (qry_count_buildingcode). It returns the number of work orders for each building. This query gets its fields from another query. Although 'qry_count_buildingcode' returns two simple columns of data ('Count of work orders' and 'Building Name'), I cannot make Access automatically...
  10. skyline16

    including a "show all" option in a combo box

    I have a form where the user selects criteria such as 'builidng name'from a combo box. The criteria is used in a query to show work orders for the building selected. I would also like to give the user the option of viewing all buildings at once. Can I include a 'Select All' option in the...
  11. skyline16

    Sending Access data to Excel

    CMP, qry_count_buildingcode opens without error. It returns two columns: one with the name of the building and one with the count of the number of work orders for that building.
  12. skyline16

    Sending Access data to Excel

    You were right!! Do you think it has to do with the connection? When I pass my cursor over the last line this box appears: 'CurrentProject.Con...="Provider=Microsoft.Jet.OLEDB.4.0, User ID=Admin;Data...' I copied the tbls,queries,module etc. from the sample database and tried to run the code...
  13. skyline16

    Sort report by using a count of a field

    I need to sort my work order report by listing the building with the most number of work orders first. The report is sorted by date next. I made a query to count the number of work orders for each building. Then I told the report to sort by this 'count' and then by date. This works until two...
  14. skyline16

    Sending Access data to Excel

    Nothing. Just closes error message and returns to screen.
  15. skyline16

    Sending Access data to Excel

    It never goes to debug mode. After clicking OK on the error message, it returns to screen with nothing highlighted. I'm not familiar with 'underlaying SQL code. Where do I look?
  16. skyline16

    Sending Access data to Excel

    I changed the name of the module from 'CreateExcelChart' to 'ExcelBuilding'. Now the error message is -2147217900: Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', OR 'UPDATE'.
  17. skyline16

    Sending Access data to Excel

    Option Compare Database Option Explicit Private Const conQuery = "qry_count_buildingcode" Private Const conSheetName = "WO by building" Public Sub CreateExcelChart() Dim rst As ADODB.Recordset ' Excel object variables Dim xlApp As Excel.Application Dim xlBook As...
  18. skyline16

    Sending Access data to Excel

    I have created a form with a command button that has the following code: Private Sub cmdXL_Click() Call CreateExcelChart End Sub There is a module called CreateExcelChart. The module is public and should be run when you click on the command button. The following error message appears...
  19. skyline16

    query doesn't return records if field is missing

    I have a query that is composed of fields from several tables. Occasionally, a record will not have data for one or two of the fields in the query. If this is the case, the record is not returned when the query is run. It's not that the field for that record is just blank, it doesn't even...
  20. skyline16

    Printing multiple access reports

    I have successfully used VBA code to print two different reports at one time. Sometimes, however, both reports are not applicable to the field chosen and I end up just printing blank reports. Is there a way to automatically cancel the printing of a report if no records exists for a particular...

Part and Inventory Search

Back
Top