Search results

  1. F

    Query with some sort of sum?

    With pleasure - I chucked the cigarettes nearly 20 years ago, so I don't feel too bad about allowing myself a glass of wine or three at a weekend (especially homemade) Having said that, tomorrow I may raise a glass of malt - a lovely gift from a very happy person who's laptop I rebuilt after it...
  2. F

    Query with some sort of sum?

    You sir, are a true gentleman! Thank you :) I am now off to raise a glass to your health. :)
  3. F

    Query with some sort of sum?

    SELECT SafeDriving.ID, SafeDriving.EmployeeNumber, SafeDriving.EmployeeName, SafeDriving.StartDate, SafeDriving.Garage, SafeDriving.NumDaysEmp, Count(SafeDriving.NumAccidents) AS CountOfNumAccidents, SafeDriving.NumAbsence, SafeDriving.Qualifying, SafeDriving.RateThisYear...
  4. F

    Query with some sort of sum?

    I don't need to group by year - in fact, for the purposes of this, I don't even need to show the year. I have changed it to count as suggested, which is now giving zero values, and removed SDYear, but it is still not totalling them up. In Design View all the other fields Totals line shows...
  5. F

    Query with some sort of sum?

    Here is a screenshot
  6. F

    Query with some sort of sum?

    Hmmm.... The total query isn't totalling, but I suspect that might be due to the fact that 0 does not exist, but rather the field is null?
  7. F

    Query with some sort of sum?

    I have a table (now stuffed full with data), which is serving its purpose quite nicely - however, someone has made a request for data from that table, but in a different way that has thrown me a bit of a curveball. Each record contains a number of fields, but the key ones for this purpose will...
  8. F

    Select Distinct returning duplicates

    Thank you - I had the bound column as 1 initially, then when I last tried to remove the ID field, I was getting a blank box; of course, I still had to change the properties to 1 column instead of 2, and then delete the column size for column 0 which was set to 0cm to hide the ID...... All...
  9. F

    Select Distinct returning duplicates

    I am not storing it at all - only using it to set a variable to then run a report. Here is the SQL as it stands: SELECT DISTINCT SafeDriving.ID, Min(SafeDriving.SDYear) AS MinOfSDYear FROM SafeDriving GROUP BY SafeDriving.ID; If I remove SafeDriving.ID, the combo is blank
  10. F

    Select Distinct returning duplicates

    If I remove the ID, I get absolutely nothing in the combo - am I going about this the hard way?
  11. F

    Select Distinct returning duplicates

    Thank you - I feel such a muppet for not spotting that one - Doh! Cheers
  12. F

    Select Distinct returning duplicates

    I have a combo box which has the following query as its source: SELECT DISTINCT SafeDriving.ID, SafeDriving.SDYear FROM SafeDriving; The field SDYear is a four digit number to represent a year, and is stored as a number. I am trying to get the combo to show only one instance of each...
  13. F

    How best to work this out

    Thanks @arnelgp - this will be filled in retrospectively for the prior year, so the date at the time of record entry is not used/relevant. However, I have used your suggestion as a basis for what I need, and it seems to work (not pretty, but functional, a bit like me)
  14. F

    How best to work this out

    There are a number of criteria that will come later in the process, including absence, however that is handled differently - in your example @Gasman, that would still be a qualifying year at that point.
  15. F

    How best to work this out

    Top man, as always! Thank you :)
  16. F

    How best to work this out

    Evening all :) I am trying to decide what is the best way in VBA to have the code check the following: I will have a table which has some employee data (Name, EmployeeID, StartDate), and I am trying to have code take a look at a 'qualifying year', and then give a yes/no answer (which will then...
  17. F

    Query to create a string from 12 fields

    Thank you both :) @arnelgp - I went with your solution, and it works beautifully, not least as I can now also have an unbound textbox on the form that is populated on open, and shows a summary of the information. I couldn't have asked for better!
  18. F

    Query to create a string from 12 fields

    Thanks - I will try and get onto it in the next couple of days :)
  19. F

    Query to create a string from 12 fields

    Hi Minty - sadly, it was one of those cases where there was no other option; essentially there are 14 (sorry, I thought it was 12) lines of fields that make up internal 'jobs', where the same job can be allocated across a number of different sites, selected by their code. Changing the...
  20. F

    Query to create a string from 12 fields

    Hi all - been a while since I have been working with Access, so bear with me as I have gotten rusty remarkably quickly. :o I am looking to have a query that takes the data from 12 fields in a record, and then returns a string showing only each value once. These 12 fields contain only a few...
Back
Top Bottom