Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. lestermadoc

    Using "SELECT COUNT"

    Well, cases always have notes, regardless of whether or not casenotes.flagger = true.
  2. lestermadoc

    Using "SELECT COUNT"

    I have a one to many relationship between "cases" and "casenotes". Wherever there "casenotes.flagger = true" I want to mark "cases.manflag = true" My problem comes when I want to mark "cases.manflag = false" where there are no instances of...
  3. lestermadoc

    Using "select count"

    I don't understand. The fields of "flagger" and "manflag" are both of the data type "bit", so if you set flagger or manflag to -1, the database will accept that as a "true", and if you set either fields to "0" then the database will accept is as...
  4. lestermadoc

    Using "select count"

    it does not accept the words 'true' or 'false', but it will accept any single digit. It sees a -1 as true, and 0 as false. I tried putting the space in regardless, and I still get a wrong data type error.
  5. lestermadoc

    Using "select count"

    well, I tried it before I sent my last message - I get that error after I changed the "true" and "false" to "-1" and "0"
  6. lestermadoc

    Using "select count"

    I get "incorrect syntax near the keyword 'then'". I had to replace "True" and "false" with their integer values: (-1 = true and 0 = false if I remember correctly) cnn.Execute ("Update cases SET cases.manflag = -1 when casenotes.flagger = -1 then -1 else 0...
  7. lestermadoc

    Using "select count"

    sorry for the confusion - I also need to mark the proper record as true when there is a match, so your examples do work for that purpose. Thanks. Can you help me with the problem of setting cases.manflag = false where there is no record in casenotes where flagger = true?
  8. lestermadoc

    Using "select count"

    Well, I'm trying to make it so that I can set "cases.manflag = false" where there is no match in "casenotes.flagger". This is actually where my problem is - I need to know if there are no "casenotes.flagger = true" for a "cases" record, and mark the...
  9. lestermadoc

    Using "select count"

    I have a one to many relationship between "cases" and "casenotes". Wherever there is a "flagger = true" in "casenotes" I want to mark the record in "cases" as "true" in the "manflag" field. The problem with my code is that...
  10. lestermadoc

    Marking a record based on data in it's "Many" relationships.

    ok, it accepts this code, but if there is only a single flag = true in the notes table, it will mark every single cases manflag = true. ??
  11. lestermadoc

    Updating records where a DATE field has gotten too old.

    Woo Hoo! Tnks much, it all works now. For the record, this is the line that worked: cnn.Execute ("Update cases SET cases.flag = 0 WHERE cases.casestatus = 1 and DateDiff(""hh"" ,[datein] ,Getdate()) >" & threshold) Thanks very much.
  12. lestermadoc

    Updating records where a DATE field has gotten too old.

    now it gives the error "Invalid column name 'now'"
  13. lestermadoc

    Updating records where a DATE field has gotten too old.

    Great! This worked! I'm getting an error with the execute query though: "'h' is not a recognized datediff option" I tried putting only one set of quotes around the "h" but then it says: "expected: list separator or )"
  14. lestermadoc

    Updating records where a DATE field has gotten too old.

    p.s. I've been working on this for the past month so your help is greatly appreciated. I created about 6 pages of code as an alternate solution, but it is unstable.
  15. lestermadoc

    Updating records where a DATE field has gotten too old.

    strCnn = "Server=Hal9000;Database=Client3;Trusted_Connection=yes" This string did not work - I get the error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified.
  16. lestermadoc

    Using rst.Find with non-PK fields

    'The following five lines work... Private Sub cmbjump_AfterUpdate() searcher = (Nz(Me![cmbjump], 0)) 'cmbjump is a combo box searched = "[cid]" '[CID] is the primary key jumpsearch 'jumpsearch is a function which I listed below. End Sub 'But these five lines don't (Arguments are of...
  17. lestermadoc

    Updating records where a DATE field has gotten too old.

    Thanks! Please be merciful with this next mundane question. About this line: &quot;Data Source=<yoursource;Initial Catalog=dbname;&quot; & _ &quot;User Id=<user>;Password=<pasword>;&quot; I cannot seem to be putting the right data in. I have an sql server running on a computer with this...
  18. lestermadoc

    Updating records where a DATE field has gotten too old.

    Thanks katskorner. I took out the cnn.close and I get the same results.

Part and Inventory Search

Back
Top