Search results

  1. P

    Solved Build A Query "Like Current Year"

    Right off the top, I'd like to mention that I am trying to build this query in Query Design and not VBA, so that it can be used in a report chart. I have a field with the date stored as yyyy-mm (2020-05). I'm trying to build a SELECT query that will pull data where the field has the current...
  2. P

    Solved Looping Through a Recordset Until RecordCount = ?

    So simple, probably why I missed it. I have a habit of making things harder than necessary. That did the trick, thank you!
  3. P

    Solved Looping Through a Recordset Until RecordCount = ?

    I have some code that is creating Outlook emails. Due to the large size of the process, I want to split this out into a few steps. My goal was to run the following: For i = 0 To rs1.recordcount = 50 <do stuff> Next i I tried with a Do Until rs1.recordcount = 50 as well, but both of these...
  4. P

    Solved Using SELECT CASE with variables

    Thanks! I'll switch it over to If-Thens....I'm not sure why I didn't think to try that! As for the 4th case, its a process that puts information into Table1, then proceeds to Table2 leaving Table1 filled (for documentation purposes) until the very end. I wasn't going to include it, but now that...
  5. P

    Solved Using SELECT CASE with variables

    I have the following code and am using the really looking at the "mgrCheck"/"ownCheck" variables for my question. I put these in to assist with my Select Case statement. If DCount("*", "Table1") > 0 Then totalAcct = DCount("*", "Table1") mgrDeny =...
  6. P

    Solved Using Recordset Data as If-Then Condition

    @Cronk - that did the trick. Thank you!
  7. P

    Solved Using Recordset Data as If-Then Condition

    This may have just answered my question, bc I'm dumb and wasn't paying attention. It pulls from AD as an array, and I typically use a Join() to convert it to string.....🤦‍♂️ I'll test and see if that fixes the problem
  8. P

    Solved Using Recordset Data as If-Then Condition

    Directly, at the moment, I can't say, b/c my code is stuck at the If-Then statement. The missing code above this however pulls the objectClass from AD and puts it in a table. I have to run different LDAP queries based on the objectClass, which is why I'm trying to specify this way. But I know...
  9. P

    Solved Using Recordset Data as If-Then Condition

    Yes, there is a fair bit more code, however I have tested that objectClass does pull what I'm asking it to
  10. P

    Solved Using Recordset Data as If-Then Condition

    I have the following code setup to run code based on a certain condition: Dim classOne as String, rs2 as ADODB.recordset classOne = "top person organizationalPerson user" If (rs2.Fields("objectClass").Value = classOne) Then <DO STUFF> End If I'm getting a type mismatch error against the...
  11. P

    Solved Testing Accounts in AD Query

    I figured this one out. I didn't realize I could modify my LDAP query to look only for the samAccountName, and not need to specify the objectClass at this stage. Thanks to everyone for your advice!
  12. P

    Solved Testing Accounts in AD Query

    That's close to what I was looking for. However, I won't know ahead of time which test the account fits into. I will have to run the account through, let's say, the objectClass=User test first. If the account pulls results, enter user information. If not, run the account through the...
  13. P

    Solved Testing Accounts in AD Query

    My apologies. Yes, I did mean VBA (it's been a long day). I've used conditional branching before, but never with LDAP queries. Do you have an example of how I could set one up?
  14. P

    Solved Testing Accounts in AD Query

    I have a list of different AD accounts with certain permissions on our network. This list includes Users and Groups, however does not mention which is which. I have separate LDAP queries that I can run from Access to pull information based on whether the objectClass is User or Group. What I am...
  15. P

    Solved Convert AD Property from Array to String in Access VBA

    I figured this out. Using the JOIN() function against the "description" field converts it to a string that is readable.
  16. P

    Solved Convert AD Property from Array to String in Access VBA

    I am getting a "Type Mismatch" error when I use Access VBA to pull the "description" field from an Active Directory group. I've done research and figured out this is because the "description" field is viewed as an array. Is there a function or tool I can use to convert this from an array to string?
  17. P

    Solved Using Subforms to Update Visible Data

    I understand. And I would certainly rather address the cause as well. It's not so much that I'm stuck with the table design necessarily, more that I have never been too sure on how to create a table storing a primary key, as the functions of the database are all separate. It's meant to be...
  18. P

    Solved Using Subforms to Update Visible Data

    So, this form is tied into a bigger database that performs multiple functions. I assigned the "Workgroup Name" in the "Roles_Workgroup" table as the Primary Key, but I noticed a couple things I'm having trouble pinpointing the cause. 1) After I enter workgroup information then select the...
  19. P

    Solved Using Subforms to Update Visible Data

    I will certainly work on posting this. But to make sure I have a clear understanding of what the master/child links are doing, if I wanted to base this off the "Role Owner" field instead of the Role Name, I would modify the OnCurrent for the text box and change the Child Field of "Workgroup...
  20. P

    Solved Using Subforms to Update Visible Data

    It's not a good reason....I'm still learning some of the more intermediate things like binding subforms. But yes, this is what I was hoping to achieve. Thank you so much for your help MajP!
Back
Top Bottom