Search results

  1. T

    Order by IIf statement?

    Have tried both these things with still no effect.
  2. T

    Order by IIf statement?

    Hi Arnel, The following is error free but always sorts by ID (or doesn't sort at all as this would logically be the order). Public Function scanresults() 'Populate results according to criteria on main form Dim scandata As String Dim OrderBy As String scandata = "SELECT qryScans.Scanned...
  3. T

    Order by IIf statement?

    Hi CJ, many thanks, however: Public Function scanresults() 'Populate results according to criteria on main form Dim scandata As String scandata = "SELECT qryScans.Scanned, " & _ "qryScans.ID, qryScans.Blade, qryScans.Engine, " & _ "qryScans.Part...
  4. T

    Order by IIf statement?

    I have a function which generates sub-form data and although it looks extremely complicated it works perfectly. The function is called in the on-load of the sub-form and can therefore be modified and the sub-form re-queried to update the data. Public Function scanresults() 'Populate results...
  5. T

    Order by Date Only

    Taking this a stage further, how do you put options in a sort order? ORDER BY If forms!mainf!chk59 = -1 then SDate, ID If forms!mainf!chk59 = 0 then DateValue(SDate); If IsNull (forms!mainf!chk59) then DateValue(SDate); Any help would be greatly appreciated
  6. T

    Order by Date Only

    Many thanks Minty, worked a treat. As to the point, I have a number of different sources of data and may want to look at them together or separately. I can sort all data by date and time (where the different sources intermingle) or by date and individual data source.
  7. T

    Order by Date Only

    Hi, I have a set of data which is imported and in the past has been sorted by date, this suits my purposes perfectly as the data is date format only with no time (it imports as a 00:00:00 time). As the data has been imported in a correct order I could sort it by date and then primary key...
  8. T

    Opinions

    Well, that is not really a technical question, only in as much as a full search of everything may become slow as the database gets bigger. I have loads of different searches in lots of different forms in databases, what you need to think about is how it is to be used. In a nutshell, what will...
  9. T

    Opening position of a form

    Reduce the height of the listbox, the system is trying to show it all as an object. If you reduce it in height you will just have to use a scroll bar when it has too much data.
  10. T

    Avoid errors with multiple users in a database

    You could use an if statement for this and check if the laccdb file exists, that way it would only do it when the first user opened it.
  11. T

    Query Values 26-50

    Now you have confused me, I thought that partition was for breaking down strings:confused:
  12. T

    Query Values 26-50

    Ok, I have the following code: Dim scantotals As String scantotals = "SELECT TempTotal.Blade, Count(TempTotal.Blade) AS CountOfBlade " & _ "FROM TempTotal " & _ "GROUP BY TempTotal.Blade " & _ "ORDER BY TempTotal.Blade ;" I can set...
  13. T

    Query Values 26-50

    Hi, I am looking to find values 26 to 50 from a query and found how to do it but have since lost it. SELECT TOP 25 Table.Field, Count(Table.Field) AS CountOfField FROM Table GROUP BY Table.Field ORDER BY Table.Field; This code will return the top 25 and I have seen a method that basically says...
  14. T

    Apply Filter

    Hi Doc_Man, It does now work as intended but in two stages. My database is only about 14Mb with all data being text and numbers. I have a concept which is a continuous form containing numerous fields of data (11) in approximately 100,000 rows. The aim is to display all 100,000 rows in a...
  15. T

    Apply Filter

    I have now placed a query at the front which selects all records or just those with eight characters: I have then based my record source in exactly the same way as before but against the query, this slows things down slightly but it's not painfully slow. I would still love to know a single...
  16. T

    Apply Filter

    Hi Minty, That is the problem, I want to show all records and then filter them or just the eight character ones and then filter them using the same filter box for either function.
  17. T

    Apply Filter

    To explain further, I am trying to include all data or just data with eight characters. "AND Scans.Blade LIKE '*' &(Forms!frmMain!tBlade) & '*'" & _ "AND Scans.Blade LIKE '????????'" & _ This one doesn't work as the search box (tBlade) when empty shows everything and just the ones with eight...
  18. T

    Apply Filter

    In theory this works: Public Function scanresults() Dim scandata As String If Forms!frmMain.Form.chkFan.Value < 0 Then scandata = "SELECT Scans.Scanned, " & _ "Scans.ID, Scans.Blade, Scans.Engine, " & _ "Scans.Part, Scans.Hours, Scans.Cycles, " & _...
  19. T

    Apply Filter

    Hi Minty, That may be the bit I was struggling with.
  20. T

    Apply Filter

    OK, I was trying to speed up a database that loaded data based on a query of a query of a query (no wonder it was so slow. I am trying to load a sub form with a lot of variations, to do this I am using a module to query the data and then a filter on the data as follows: Public Function...
Back
Top Bottom