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 strongm 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. mdthornton

    Default a value in Query

    Depends how you are doing the insert.... is it from a form, SQL, directly in the datasheet view etc etc Best Regards, Mike
  2. mdthornton

    Data Report - Data Environment Command SQL

    You'll need to write another query to return the max test date for each student then join this into your existing query (qry_rpt_studentregistered1) or in the SQL above to limit the rows returned, eg: qMaxDates: select sutdentID, max(testDate) from myData group by studentID Best Regards, Mike
  3. mdthornton

    HOW TO MAKE OUR OWN DATABASE ICON

    You can make a icon bitmap in MS Paint. Once you've done this set the application icon (tools->startup) to point to your icon. Best Regards, Mike
  4. mdthornton

    Export Query to Excel Cell

    You should use transferspreadsheet rather than transfertext but unfortunately you can't specify a range with this method when exporting :-) If its an option it might be better to pull the data from the excel side. you should be able to control where the data ends up this way. Best Regards, Mike
  5. mdthornton

    EASY QUESTION

    between #1/1/99# and dateadd('d',-60, now()) Best Regards, Mike
  6. mdthornton

    EASY QUESTION

    between 1/1/99 and dateadd('d',-60, now()) Best Regards, Mike
  7. mdthornton

    Counting Multiple Fields

    I don't think you can do this in one go. You need to write 3 queries, one each to count the rows in the 2 tables and a third to do the division, ie: Q1: select count([Visit No]) as Visits from tableA Q2: select count([Test Drive No]) as Drives from tableB Q3: select Drives/Visits as myRatio...
  8. mdthornton

    Reporting by month

    You could try it a different way. Add a (hidden) column to your query as Month(myDate). In your combo box just put 1,2,3,4 etc in the secound column, ie col(1). Then use the same syntax for your criteria line: [Forms]![frmReportDept]![2ComboMonth].[Column(1)] Out of interest don't you need to...
  9. mdthornton

    Reporting by month

    How are you getting the value from the combo box into your query? Post the syntax you are using.... Best Regards, Mike
  10. mdthornton

    Opening report with combo box

    Tekila The [CSRName]= '" + Me.agentselect + "'" part is a where clause applied to the results of the reports underlying query. Best Regards, Mike
  11. mdthornton

    IIf Then Syntax to perform Calculation

    I think your problem is that you have not defined a value when PPDepPaid is false, in this case you iif returns NULL and if you try to sum across a mix of nulls and numerics you will get NULL. Try this: =IIf([PPDepPaid]=-1,[ParkingDepositPrice],0) and then in the footer...
  12. mdthornton

    COUNT problem

    Short answer, you can't. Not that I'm aware of anyway. When you need this you have to do it in two steps. Q1: select distinct colname from x Q2: select count(colname) from Q1 Best Regards, Mike
  13. mdthornton

    Opening report with combo box

    Try this: Private Sub byAgent_Click() If IsNull(Me.agentselect) Then MsgBox "Please choose an agent" Else DoCmd.OpenReport "printevalbyagent", , , "[CSRName]= '" + Me.agentselect + "'" End If End Sub Best Regards, Mike
  14. mdthornton

    output to file per group

    You'll need to do this in a module. Write a query that returns the criteria you need to define each report (maybe just customer number in your case). Process this result set in a loop and open up a report for each customer. You can use the customer number to set the where clause when you open...
  15. mdthornton

    Report Grouping

    I couldn't see you snapshot but I'd guess that you have all your controls in the detail section. Pull all the common controls (eg customer id, name address etc) into the report header section and leave the order specific stuff in the detail (eg part number, quantity, price). Best Regards, Mike
  16. mdthornton

    Run a report after choosing value from combo box

    Well, in your query you can refer to the currently selected value in the combo box or you could bind the combo box to a (temp) table and join to this in your query to get the appropriate data. Best Regards, Mike
  17. mdthornton

    Run a report after choosing value from combo box

    Not sure exactly what you have so far but I think maybe in the change event for the combo box you need to open your report, eg: Private Sub Combo1_Change() DoCmd.OpenReport "myReport", acPreview End Sub Best Regards, Mike
  18. mdthornton

    Report Orientation

    Yep, just go into page set up in the report design view. You can set orientation, page size, margins etc in here. Best Regards, Mike
  19. mdthornton

    Page Totaling

    Dave Interesting problem.... I don't think there's an easy way to do this - you'll need to write some code in the report module. I had a fiddle and the code below will do your page totalling and will work for simple reports. Your grand total you can do with a regular sum control. Hope this...
  20. mdthornton

    How to return the top 5 values in a query?

    You can limit the result returned by a query using the top values property. I've added an order by clause so that you get the top 5 amounts: SELECT TOP 5 Codetable.code, Count(CodeTable.Code) AS Count, Sum(CodeTable.Amount) AS TotalAmount, Avg(CodeTable.Amount) AS AvgAmount FROM CodeTable GROUP...

Part and Inventory Search

Back
Top