Search results

  1. H

    Join Query to pull in 1 record based on threshold reached

    I have 2 tables. One has employee info and the second has time data based on thresholds reached in the employee info. Obviously, a basic join will bring in all of the threshold records. How do I get it to only pull in the one that satisfies the threshold condition?
  2. H

    Don't remember where on report I put a hidden field...

    Going back a ways but I remember I had placed a hidden field somewhere on a report in order to perform a calculation to be used elsewhere in the report... Now, it is causing an error as I have changed how the report is generated but I no longer remember where that field was... Anybody have any...
  3. H

    Dynamic If statement

    This is the code (except I didn't yet change it to actually execute the command): Set db = CurrentDb() Set rs = db.OpenRecordset("QARR Definitions - Eligible") DoCmd.SetWarnings False rs.MoveFirst Do While Not rs.EOF If rs.Fields("EligCrit") <> "All"...
  4. H

    Dynamic If statement

    I've changed my approach to how I'm doing this... Instead of deleting the records based the criteria, I'm now building the SQL string and running an Append aka Insert based on the criteria (which is all specified in a separate table)... This still gives me the flexibility of the criteria being...
  5. H

    Dynamic If statement

    The condition isn't on the field that holds the criteria... The conditions are on the fields that are described in the contents of the criteria field... Plus, the criteria can change (and often do)... I have it table driven right now so that a simple change to one table results in the...
  6. H

    Dynamic If statement

    Interesting idea... A case statement won't work because the criteria I need to test for is still stored in the contents of one of the fields on the record... I'm starting to think that the only way I can get this to work is to parse the criteria stored in the variable and do something that...
  7. H

    Dynamic If statement

    Do Until rs.EOF If rs![IndexNumber] = strName Then rs.Delete How does this help??? The field contains the criteria for other fields on the record... I think another way of describing my issue is something similar that I have done in Excel using the Indirect function - it...
  8. H

    Dynamic If statement

    Thanks... The recordset is defined... When I cut the snippet of code, I didn't include the definitions...
  9. H

    Dynamic If statement

    Thanks but not quite... In the example you posted is the line: If rstShippers![CompanyName] = strName Then It is this line that I want to make dynamic, i.e. I want to make the rstShippers![CompanyName]=strName a variable...
  10. H

    Dynamic If statement

    I have tried this as well (using Eval): Do While Not rs.EOF If rs.Fields("EligCrit") <> "All" And rs.Fields("EligCrit") <> "If Diabetes Screen" And _ rs.Fields("EligCrit") <> "No eligibility" Then If Eval(rs.Fields("EligCrit")) <> True Then...
  11. H

    Dynamic If statement

    This is what I have tried unsuccessfully (note it is not doing the delete, etc. - just testing the program flow): rs.MoveFirst Do While Not rs.EOF If rs.Fields("EligCrit") <> "All" And rs.Fields("EligCrit") <> "If Diabetes Screen" And _...
  12. H

    Dynamic If statement

    This is an intermediate table to determine which records require additional processing... A previous procedure creates this table for one purpose... Then, instead of creating another table, it should be easier to just delete the unwanted records leaving the records that require yet further...
  13. H

    Dynamic If statement

    Arghhh... I always forget the Code demarking... rs.Fields("Patient_Sex") = "F" and rs.Fields("CurrentAge") Between 21 and 64 If Diabetes Screen If Diabetes Screen rs.Fields("CurrentAge") >= 50 rs.Fields("CurrentAge") >= 55 rs.Fields("Patient_Sex") =...
  14. H

    Dynamic If statement

    Sorry... Here are the first few records and the values on that field... You can ignore the ones that say All and If Diabetes Screen... You can see I tried putting in the recordset reference for the VBA... rs.Fields("Patient_Sex") = "F" and rs.Fields("CurrentAge") Between 21 and 64...
  15. H

    Dynamic If statement

    I have a field called Criteria. On each record it the field contains something like CurrentAge >= 55. I want to plug the contents of the field into the If statement.
  16. H

    Dynamic If statement

    What I am looking to do is to walk through a DB that has a field on each record as to what conditions to check for. If the conditions are true, keep the record. If false, delete the record. The contents of the field that has the conditions do change from record to record. I want to build an...
  17. H

    FileCopy problem

    Here is the meaningful snippet: Dim ETCPOrig As String Dim ETCPDest As String Set db = CurrentDb() If Not IsDate(DateEnterB) Or Not IsDate(DateEnterE) Then MsgBox ("You must enter a valid date!!!") Else NPDateB = DateValue(DateEnterB) NPDateE =...
  18. H

    FileCopy problem

    Here is the meaningful snippet: Dim ETCPOrig As String Dim ETCPDest As String Set db = CurrentDb() If Not IsDate(DateEnterB) Or Not IsDate(DateEnterE) Then MsgBox ("You must enter a valid date!!!") Else NPDateB = DateValue(DateEnterB) NPDateE =...
  19. H

    FileCopy problem

    One of the PC's having the problem is running XP... I tried using the shell command and I actually see the copy taking place but the file doesn't show up and there is no error message... VERY strange...
  20. H

    FileCopy problem

    I can manually copy from source location to destination... When it does the copy, I see on the screen the copy taking place... But after it supposedly finishes, the file isn't there...
Back
Top Bottom