Search results

  1. D

    #name error with DCount

    Sorry, but neither suggestion was successful. I'm beginning to think I'm going about this the wrong way - I may be stepping on my own feet. If you guys don't mind, let me explain what I'm trying to accomplish and pick your brains regarding the best way to go about it. One table holds the...
  2. D

    #name error with DCount

    I don't have any indication of any missing references.
  3. D

    #name error with DCount

    There's not any vba for this form yet. It's just a form with some calculated fields. I have something happening now that I have never seen before - I changed my statement in the control source to this: =DCount("*","jobs with ncrs distinct test") And now the control says #error and is...
  4. D

    #name error with DCount

    The brackets are not part of the name - I put those in there because the name is so awkward. And yes, I am renaming things. I just installed V-Tools so I can use the deep search and get everything cleaned up. Like I said in my last post, now I'm getting an invalid syntax error when I add the =.
  5. D

    #name error with DCount

    Yes - the query runs just fine. The initial query does run with parameters, then this one queries the first one. The query results are displayed in a subform, as shown in the screen shot in my first post. This makes no sense at all to me - I did check my field source and it was indeed missing...
  6. D

    #name error with DCount

    I am constructing a form with multiple calculated fields from multiple queries. The form itself is not bound to a record source. I got one field working with DCount. However, the other field is giving me a #Name error and I cannot see why. The control is a text box named TxtNCRjobs. The...
  7. D

    Select Distinct question - wrong results?

    Awesome - the group by helped me to see that there were actually 2 jobs that had more than one ncr so my initial query was returning the right value after all. Plus, I was able to see something else that I was doing wrong. Thanks very much. You guys rock.
  8. D

    Select Distinct question - wrong results?

    I'm not sure what you mean - how will that give me a count of the number of unique values?
  9. D

    Select Distinct question - wrong results?

    I have a query which returns all the jobs that have an NCR associated with them: SELECT DISTINCT [Non Conformance].[NCR#], [Production raw data].jobnum, [Production raw data].start_date, [Production raw data].end_date, [Production raw data].jobname FROM [Non Conformance] INNER JOIN [Production...
  10. D

    DCount - error 3464 data type mismatch in criteria expression

    I am counting records with very specific start and end dates. I did get this working - thanks for your response.
  11. D

    If statement won't work

    Select Case did the trick! I tried If Not but it didn't work either, as long as I was testing inequality for 2 values. When I just used one, it worked fine. So I decided to use Select Case instead of nested If statements. It never occurred to me that testing inequality for 2 values was...
  12. D

    If statement won't work

    sorry - that didn't make any difference. I'll look at it again tomorrow.
  13. D

    If statement won't work

    The numbers are text values. I have stepped through the code many times. It is not being bypassed - it just acts like the exclusion parameters are not even there.
  14. D

    If statement won't work

    Sorry, but that did not work. It still picked up the ones I'm trying to exclude. This is so weird - the if statement is not working at all, whether I set it up to get the ones that equal 25 or 26 or try to exclude them. It's like it's not even there.
  15. D

    If statement won't work

    For the life of me, I cannot tell why the if statement below (highlighted in red) will not work. I have been running it through the debugger all day but I just am not seeing it. I am trying to add records from a spreadsheet to a table. I need to exclude records with a sales class value of...
  16. D

    DCount - error 3464 data type mismatch in criteria expression

    Would someone be willing to point out my error in this DCount expression (highlighted in red)? I can't see the mismatch. Private Sub TxtEndDate_AfterUpdate() Dim dStart As Date Dim dEnd As Date Dim strSQL As String Dim lNumJobs As Long On Error GoTo ErrProc Set db = CurrentDb() Set rs =...
  17. D

    Trying to count records

    I did miss that 3rd parameter - forest for the trees, I guess. I tried this: NumZero: -Sum([Quantity Scrapped]=0) and got the same expression too complex error message. I'll see what I can do with a UDF instead of a query. Thanks
  18. D

    Trying to count records

    I'm using a query to try to count the number of records in another query that have a value of zero. But, when I try to run the query, I get a message that the expression is too complex to be evaluated. NumZero: Count(IIf([Quantity Scrapped]= 0,0)) This doesn't seem that complex to me. What...
  19. D

    Extracting a date from a text string

    Thanks, Colin, for the explanation. That makes perfect sense. Everything is working the way I want it to now, so I appreciate your help very much. I appreciate the help from everyone that offered insight. I'm marking this one solved. Diana
  20. D

    Extracting a date from a text string

    I just realized that InStr() returns a postional number, not a string. That's probably where my type mismatch is coming from.
Back
Top Bottom