Search results

  1. P

    Solved Chart Displaying Empty Axis Values

    I have a bar chart I'm trying to setup using historical data from a table. I'm tracking the data by date, and the table column being charted on the axis is set as a Date/Time field. The issue is that my recorded dates are spread out, not daily. So the chart is displaying all the dates in between...
  2. P

    Handling Spaces in Table Names Used as Variables

    I have the following code: tblName = "TableA" fldName = "User ID" sqlStr = "SELECT " & fldName & " FROM " & tblName & " WHERE '" & fldName & "' = '" & rs1.fields("Username") & "'" Set rs1 = currentdb.openrecordset(sqlStr) It runs fine when fldName doesn't include a space (ex: UserID), but I...
  3. P

    Code Execution Skips with No Error

    I have the following code that is included in a function that runs through a recordset of users. It executes perfectly for the first record. When it gets to the second record, the code runs the ".Range("A2").CopyFromRecordset rs1" then skips back to the main function and doesn't finish out the...
  4. P

    Solved Error 1004 When Passing Formula to Excel

    I have the following formula that runs as expected when used directly in Excel. But when I try to add it into my Access VBA, I get error 1004 "Application Defined or Object Defined Error". I think it has to do with my double-quotes to identify text in the formula, but I don't know how to...
  5. P

    De-concatenate String for Comparison

    I have a table of users where, for application reasons, IDs are stored as "user123;user456". I also have a table of their records to store their status from Active Directory. How can I go about splitting that string up at each instance of a semi-colon, then compare that user ID with the status...
  6. P

    Solved Dynamically Change Textbox Control Source

    I’m posting from my phone so I don’t have code on me at the moment, but here’s the situation. I have a form that contains two sub forms, two combo boxes, and a text box. Combo box A selects an application, which after update will populate sub form A with data (displayed in database view)...
  7. P

    Error Passing Formula from Access to Excel

    I wrote the following formula in Excel originally in order to concatenate a bunch of data. =TEXTJOIN(";",TRUE,IF(A:A=A2,B:B,"")) I am trying to pass the formula into Excel from Access in order to run the concatenation on selected files. However I keep getting an "Application-defined or...
  8. P

    Solved Invisible Characters from Excel

    I have a spreadsheet report coming from an application. I do some VBA manipulation in Excel from Access to the file, then import the data to Access. One of the manipulation steps I have Access perform is to add in a column to the Excel file called "Key" (see code below). However, I get the...
  9. P

    Solved Do Until Loop with MsgBox

    I'm toying with an idea and wanted to see if there is any validity to it. If I had a function I wanted to run multiple times based on a user's MsgBox choice (yes or no), could I use a do until loop instead of hard-coding the function to run a hundred times over? Basically: Do Until MsgBox = 1...
  10. P

    Solved Multiple JOIN Query

    I have the following tables (anonymized): Compare_App: Name John Smith Compare_Active: Name John Smith Compare_Terms: Name John Smith I am trying to write a multi-join query that says Select the names from "Compare_App" that also appear in "Compare_Terms" and exclude those...
  11. P

    Solved Modifying the VBA of a Split Database

    I recently split a database for the first time to assist in its performance. I still have some changes I need to make to the VBA. How do I go about modifying the VBA of the split database? I have the front-end (.accde) that has the VBA but is inaccessible, and the back-end file doesn't appear to...
  12. P

    Solved Empty Array

    So the following code doesn't throw any error, however it is creating an empty array, when there should be 4 array records. Not sure what exactly needs to change, but I'm thinking I'm missing a step to build a complete array rather than resetting the array with each iteration. Dim vArray As...
  13. P

    Solved Building and Updating an Array of Variables from a Recordset

    New problem! I'm trying to build an array that stores a variable each time a loop is done in a recordset. The variable is a file path that is built based on a piece of data from the recordset. How would I make sure the code adds each new variable as the code loops, instead of creating a new...
  14. P

    Solved Saving an Outlook Message Error

    I have the following functions that are used to generate an Outlook email. It works fine, unless I include an "attach1". Then the email that gets created does not include the attachment I specified as variable "attach1", but instead includes the saved version of the same email. Public Function...
  15. P

    Solved Cycling Through Selects

    I have some code to update table information. All it is in input boxes and sql statements. Let's say I have an input box that I specify they enter either True or False. IF they enter something different, how would I cycle the code back to the original input box so they could change their...
  16. P

    Invalid Procedure Call or Argument

    I'm getting the error "Invalid Procedure Call or Argument" with the following piece of code: replaceLDAP = Right(strRole, (Len(strRole) - 9)) I've done some research and tried adding in a check to ensure "strRole" > 0, which I also manually confirmed, but no dice. I have been able to figure out...
  17. P

    Solved Pulling Multiple Last Names From String

    I am trying to extract last names from list of full names. I've got the standard down to pull a common first-last name (John Smith). I am running into a problem with names that have multiple last names (John Smith Anderson). Here is the code I have that works for the common name: trimStr =...
  18. P

    Solved Text File Import Error

    I am trying to import a text file but getting the following error: "Field 'SubSystem_Screen_Owner Department_.... ' doesn't exist in destination table 'TableA'" The problem is all of those fields are in my TableA, but it is inserting underscores between each header name. I've attached a...
  19. P

    Solved HTML with Bullets

    I have a function to create emails from my database, which works fine. The problem I'm running into is trying to insert data from a recordset into the HTML code as bullet points. Here is what I have so far: Set rs1 = CurrentDb.OpenRecordset("SELECT DISTINCT Manager_ID FROM TableA WHERE...
  20. P

    Solved Working with Global Variables

    I have a variable (strQry) in Form A. I am trying to declare it globally so that I can use it in Form B. However, when I compile, I get the "Variable not defined" error on the Form B sub at the "strQry" variable. 'FORM A' Option Explicit Option Compare Database Public strQry As String Public...
Top Bottom