Recent content by DeathTrap82

  1. D

    Error 3464 (Data type mismatch in criteria expression) with OpenRecordset

    Alright, I've fixed that...but now it gives me an error saying "No current record." (Error 3021, if that is needed). There is definitely a table called Degrees with a column called Degree (I should probably rename them, that's going to drive me crazy).
  2. D

    Error 3464 (Data type mismatch in criteria expression) with OpenRecordset

    I'm having some trouble with my code (posted below). It keeps throwing run-time error 3464 at me at the "Set rs = db.OpenRecordset(strSQL)" line. Any ideas? Private Function concDegrees(r As DAO.Recordset, n As DAO.Recordset) As String Dim rID As Long, strDegrees As String, rs As...
  3. D

    DLookup with array critera

    That worked perfectly. Thank you! :D
  4. D

    DLookup with array critera

    Oh! I didn't notice that. Do I have to use a comma as a delimiter? Some of the titles in my array have commas in them, which will probably cause a few problems. When I try out the code below, I get the following error: strTitleCodes = Array("Asst Prof-medcomp-a", "Asst Prof IR-mdcp-a"...
  5. D

    DLookup with array critera

    I've tried adding that, but now I seem to be getting Error #13 (Type Mismatch). I feel like I'm missing something really obvious, but can't quite figure out what. Any ideas? strTitleCodes = Array("Asst Prof-medcomp-a", "Asst Prof IR-mdcp-a", "Ast Prof Clin X-mdcp", "Asst Adj Prof-mdcp-a"...
  6. D

    DLookup with array critera

    Well, I made a simple test case to see if the "In" keyword worked and it doesn't. It throws a compile error (expression). I'm hoping one of you would know how to use an array as part of a DLookup and DMax criteria so I only get the results that have title codes matching one of the ones in my...
  7. D

    DLookup with array critera

    I'm trying to write a DLookup (and DMax) using an array as one of the criteria (code snippet below). However, I'm not sure how to get it to work. I need it to only return the [PeriodStart] if the [TitleCode] is one of the numbers in the array titleCodeSearch. I had thought there was an "In"...
  8. D

    Trouble getting Dcount to work with a date critera

    Argh. :banghead: Turns out the #'s work - the test cases I was looking at were returning the correct values. I just wasn't letting the program run long enough to get to places where it actually should return something (after waiting for it to loop through over six thousand records a couple of...
  9. D

    Trouble getting Dcount to work with a date critera

    I tried adding # around newStart, but I stopped getting any results at all. delay = DCount("*", "[Leave]", "[DOMID] = " & rID & " And [LeaveType] = 'Childbearing Leave' And [LeaveEnd] > #" & newStart & "#")
  10. D

    Trouble getting Dcount to work with a date critera

    I'm having a bit of trouble creating a DCount statement in my code, I'm hoping that I can get help for it here. I'm also hoping I'm posting this in the right section :D Basically, what I'm trying to do is get the number of childbearing leaves after a given date (newStart, in this case)...
Back
Top Bottom