Recent content by andylaw31

  1. A

    "Data type mismatch in criteria expression" after changing criteria

    Thanks for the offer JHB. We'd have had to anonymise the data before posting it, as it contains marks for student assessment. We've now managed to create a workaround by splitting it into two queries - one with the details about each student and one with their assessment data - and then a...
  2. A

    "Data type mismatch in criteria expression" after changing criteria

    Anyone got any ideas on this? Still not working.
  3. A

    "Data type mismatch in criteria expression" after changing criteria

    Just amended the query to put the two lines of criteria onto one, which seems to work. New code below, but still producing the same behaviour on update of academic year (works fine for 2014/15, but not 2015/16). SELECT DISTINCT srs_fac.fac_name AS faculty, [awd_desc] & " " & [rou_name] AS [full...
  4. A

    "Data type mismatch in criteria expression" after changing criteria

    Nope. Apologies for the confusion. I use the style "2015/16" in prose, but we use the style "2015/6" on our student records system (hence the unhelpful inconsistency in my original post). I have made that mistake before though!
  5. A

    "Data type mismatch in criteria expression" after changing criteria

    I have a query that pulls out student assessment data. It was looking at 2014/15 data but now it's come time to move on to 2015/16 data. I have two lines (by lines, I mean lines in design view, not lines of SQL code) of criteria on my query, each of which filter by academic year. After updating...
  6. A

    IIf in query criterion

    vbaInet - thanks, that's even simpler!
  7. A

    IIf in query criterion

    Thanks for the replies. CJ_London, I'm using your solution (as it seemed the simplest). I put the following as a field. Choose((Month(Date())>=11)+2,Val([cam_sas].[ayr_code]) Between Year(Date())-5 And Year(Date()),Val([cam_sas].[ayr_code]) Between Year(Date())-6 And Year(Date())-1)=True This...
  8. A

    IIf in query criterion

    Hello, I'm trying to use IIf in a query criterion, but not having any luck. I have a field called 'ayr_code' which has values in the format: 2015/6 2014/5 2013/4 2012/3 2011/2 2010/1 2009/0 2008/9 I want to return all records where in this field: if the current month is November or...
Top Bottom