Search results

  1. D

    Age Group function doesn't like null fields

    Managed to do it in the report. In the detail section I had a text box which did a running total then in the report footer I used another textbox which grabbed the total from the other one and it works great :)
  2. D

    Multiple queries and general issues...

    Might have to send you it later! I'll tell you what I've done so far (pretty much started again and used your ideas). I have 3 append queries (adult, partner and child) and these read the ethnic origins and enter them into a temporary table (child is disabled at the moment because I can't get it...
  3. D

    Column Issues!

    I've just noticed that it works in print preview but not in report view and in print preview I only seem to be getting 4 postcodes to a page and therefore I'm getting multiple pages and the idea was to condense them all into less than a single page. I've tried messing with the column height and...
  4. D

    Column Issues!

    No idea so probably not! How do I do that?
  5. D

    Column Issues!

    Afternoon! I've currently got a simple report with one text box in it which is linked to a query that produces a list of names which is going to be a sub-report. So rather than it printing a long list I want to order it in columns. I know that I have to use page setup to change the column...
  6. D

    Summing in a report

    Ok so managed to fix it. Added an invisible text box into the detail which ran the sum and then in the page footer I had a textbox grab the value from the sum text box and it worked fine! Just have the issue now of not being able to see the header and footer when it's used as a sub report
  7. D

    Summing in a report

    If I do it in the detail field then it prints a total after every single row. Here is a screen grab of what I have right now:
  8. D

    Summing in a report

    Also just to add this is a subform going into a bigger report. When it's inside the bigger report, it has it's own header and footer cut off! Why is it doing that?
  9. D

    Summing in a report

    Hi guys, I've got a report that prints out a query and looks like this: Age Group | Count Under 1 23 1 Year 34 . . And I want to add a field at the end that totals up all of count. I've added a text box to the footer and tried using =Sum([CountOfDoB]) and...
  10. D

    Age Group function doesn't like null fields

    Never mind, sorted that report issue, it was trying to order by fields I hadn't even put on the report! Just realised I forgot to add something to the end of the query/function to add up the totals of the groups. can't seem to work out how to do that though. All I can think of is running another...
  11. D

    Age Group function doesn't like null fields

    I know this is the Function sub-forum but do you have any idea why when adding the query to a report and trying to display it it keeps opening prompt boxes for every field in the Child table? I'm only selecting DoB from Child in the query.
  12. D

    Age Group function doesn't like null fields

    Just did and it works perfectly! Thanks for all the help :D:D:D
  13. D

    Age Group function doesn't like null fields

    Cool looks good! Now I'm getting a Type mismatch error highlighting: AgeGroup = "D) 3 Years" I've just had a scan down the DoB entries and I don't see anything that could cause an error :s
  14. D

    Age Group function doesn't like null fields

    I changed to this: Public Function AgeGroup(DoB As Date) As Date Dim intAge As Integer If DoB Is Not Null Then intAge = DateDiff("yyyy", [DoB], Now()) + Int(Format(Now(), "mmdd") < Format([DoB], "mmdd")) And this gives me a compile error and type mismatch on the DoB after the If.
  15. D

    Age Group function doesn't like null fields

    Hey guys, I'm running the following function from a query: Public Function AgeGroup(DoB As Date) As String Dim intAge As Integer intAge = DateDiff("yyyy", [DoB], Now()) + Int(Format(Now(), "mmdd") < Format([DoB], "mmdd")) Select Case intAge Case Is < 1 AgeGroup = "A) Under 1" Case 1 AgeGroup =...
  16. D

    Age group Query.

    Right so the problem is because I have some children where I don't have their date of births. I tried adding a 'is not null' on the count of DoB but that isn't working :/
  17. D

    Age group Query.

    I'm now trying this function I pasted before on another similar database. The syntax is the same as is the SQL in the query yet I'm getting a data type mismatch in the expression error! I'm using the exact syntax for the expression and the exact SQL query and both fields in both databases are...
  18. D

    Age group Query.

    Worked perfectly! Thanks! Last thing to sort with this query: I want to make sure that if no child falls into a group (for instance the under 1 group) I still want to show that group and say that there are 0 people in it. In another thread someone said about using the following: iif([Age...
  19. D

    Age group Query.

    At the moment i'm getting this in the query: CountofDob | Age Group 1 2 Under 1 1 1 Year So it is counting the number of people who are not in an age group which is what I don't want to know or show. I understand about using the...
  20. D

    Age group Query.

    Hey guys, I've got a module that reads a date of birth and puts it into the relevant age group which works fine except that I want to ignore all people over the age of 4 which is so simple yet I can't seem to do it! Here is my function: Public Function AgeGroup(DoB As Date) As String Dim...
Back
Top Bottom