Recent content by Oscar_W

  1. O

    Need to display a zero

    Sorted it. =IIf(IsNull([In VICTORY.CountOfCountOfSurname]),0 & " " & [surname] & " in Victory",([In VICTORY.CountOfCountOfSurname]) & " " & [surname] & " in Victory") Many thanks for the initial steer.
  2. O

    Need to display a zero

    Many thanks for the very speedy response but that is giving me two errors? When I type it into the control box it says that it has an "invalid control source". If I ignore that and try and display the report, I get an error that tells me there are too many ")" I have tried mucking about with...
  3. O

    Need to display a zero

    Hi, The following control in a report displays the number of people with surnames the same as those who served onboard HMS Victory during the battle of Trafalgar: [In VICTORY.CountOfCountOfSurname] & " " & [surname] & " - in VICTORY." It works fine but if there are no matches, it just...
  4. O

    ControlTip text

    RG, It looks like you didn't get a thanks for this. It has just helped me...so thanks :) Oscar
  5. O

    Query calculations

    I have finally managed to get this to work but have to have one query based on another. Can anyone help me to combine these two below into one please ? First one named Qry_Test SELECT Qry_All_Ops.StartDate, Qry_All_Ops.Unit, First(Qry_All_Ops.JettyNumber) AS FirstOfJettyNumber...
  6. O

    Query calculations

    Thanks mainly to John K I have the following code from a previous post which identifies when a 'Unit' has been entered at 2 different 'JettyNumber' on the same 'StartDate' SELECT Qry_All_Ops.StartDate, Qry_All_Ops.Unit, Count(Qry_All_Ops.Unit) AS CountOfUnit, Sum(Qry_All_Ops.JettyNumber) AS...
  7. O

    Sort by decimal fraction

    Excellent, thanks. I had bodged a fix where I wrote a second query and called one from the other but this is so much neater. Although it works fine, I have realised that there is an error in my maths and the code below won't find all the "errors" Result: [sumofJettyNumber]/[countofunit] Eg. If...
  8. O

    Sort by decimal fraction

    Thanks. I added Expr1: [result]=CInt([result])as a new column and it sorts the results into -1 and 0. It's the 0's I need but when I add the criteria "=0" as a where expression to the new column it tells me the expression is too complex ! New code SELECT Qry_All_Ops.StartDate...
  9. O

    Sort by decimal fraction

    The attached file shows a screen shot of my query. I need now to isolate only those results that are not whole numbers. I think it will be MOD or INT but I can't get it to work in the query. Also, do I add this "where expression" to the Result column or do I need to create a new Expr: column ...
  10. O

    Count problem

    I have managed to make a little progress on this but not much. I have written two queries: I have to admit that I don’t fully understand how they work but the first one below narrows the data down such that if a ‘Unit’ is listed more than once it must be in more than one location...
  11. O

    Count problem

    Thanks very much for your quick reply but I regret that I really don't understand what you mean.:confused: I couldn't trouble you for a quick & dirty SQL text could I ? Thanks
  12. O

    Count problem

    I have one table which contains the following fields: StartDate, Unit, Location, Operation. I want to run 2 checks: 1. To show if a Unit is in two different locations on the same day ? Eg. 23 May 07, Ship A, Jetty B, Fuelling 23 May 07, Ship A, Jetty B, Water - Is permitted. 23 May...
  13. O

    Openform - Date range

    Got it ! The code below fixed it wherestring = "StartDate between #" & Form_OpenDate & "# and #" & NextDay & "#" Hope this helps someone else.
  14. O

    Openform - Date range

    Afraid not. The code jumps straight to the error section and doesn't even appear to make any sense of the string.
  15. O

    Openform - Date range

    I have spent hours trying to sort this via searching here and elsewhere. A button on a diary form sends an email containing the day's events. I have been asked to send the current day and the next day. This has me stumped! Form_OpenDate = Format(Me.Text62, "MM/DD/YYYY") ' Gets the date being...
Back
Top Bottom