Search results

  1. G

    Filter out current quarter's records from query

    I have a query that looks at the last 2 years of records based on the 'SubmissionDate' field. Below is the SQL: SELECT * FROM qryAllComplaints WHERE (((Year([SubmissionDate]))>=(Year(Date())-1))) ORDER BY SubmissionDate; I want to use this query as the source for a second one, but one where...
  2. G

    Help with combo box and years

    I have a combo box which lists out all years going back to 2014. It's a value list with the row source of: "2023";"2022";"2021";"2020";"2019";"2018";"2017";"2016";"2015";"2014" So when it turns 1/1/2024, I need to manually add "2024" as a value. Is there an automated way to do this instead? So...
  3. G

    Add prefix to top 10 query

    I have a query which groups and counts values, and only shows the ten highest (SELECT TOP 10). It basically looks like this: SubCategory CountofSubCategory Henry 67 John 53 ....and so on I want to add a prefix number to the subcategory field so that it basically shows up as...
  4. G

    Help with AfterUpdate event to add Outlook Attachment to Hyperlink field

    Hello. Bit of a unique/challenging question. I have looked for some answers online but can't find anything. This might be a bit too specific of an issue. I have a Hyperlink control in my form to allow users to drag a file from a File Explorer onto the control and it saves that file in a...
  5. G

    Solved Help with on click event of field to bring user to website

    I have a single view form of customer complaints. One of the fields in the form is a customer ID field. I'm hoping to allow the user to be able to click that ID field and it automatically open up the customer profile on our website. The url is pretty simple. Something like...
  6. G

    Help with PDF page number VBA

    I found some VBA code online to add page numbers from Access to a PDF. It works but the formatting of the numbers is not ideal, and I'm admittedly unsure exactly what needs to be changed to achieve what I'm looking for. Here's the code: Sub addPageNumbers() Dim acroApp As Acrobat.acroApp...
  7. G

    Help with OpenForm code

    I have listbox in a form which lists changes made to a record. I have code that lets the user click an entry in the listbox and it opens up a single view form with a more detailed view of the change. I want the code to open to that particular entry but also apply a filter as well so that the...
  8. G

    Help with AfterUpdate combobox

    I have a combobox with three preset values (New, In Progress, Closed). I want to have VBA where if the combobox's value is changed from 'Closed' to 'In Progress', then my date field (ClosedDate) is changed to null. Any suggestions? I don't know how to specifically make an action happened when...
  9. G

    Lowercase last names

    Curious if someone could help with this issue. Couldn't find a specific guide online to assist. I have a table of last names that are entirely uppercase. I want make them proper text. I'm using the following function in an update function that works well: StrConv ( [CustomerLastName], 3 ) The...
  10. G

    Help to group year and month data in query

    Here's a sample of my data: 202210 202208 202210 202201 202204 202109 202104 202106 202303 202207 202209 202211 202202 202108 Its year and month. I want to use a query to group this data and count it. I want to group it in 12 month intervals (ie. 202205 - 202304) Any suggestions? Not sure if...
  11. G

    Open form to records matching the records in another query?

    Basically the title...any suggestions for code to open a form to only the records that match an ID field of records in another query? Which isn't the form's record source?
  12. G

    Need help with Replace module and wildcards

    I am using the below function which uses a table to replace values. It works well except I need to add in wildcards and I'm unsure how to do it correctly. Right now, if I want to replace 'Hello' with 'Hola', it works perfectly. But I want it to replace any instance of hello, even if it is...
  13. G

    UPDATE query to rearrangement name field

    I have a name field which is formatted as "LastName, First Name". I want to rearrange it to simply be "FirstName LastName" and get rid of the comma. Any suggestions on how to write that in an update query? I feel like I found a guide online to do this before, but for the life of me, I can't...
  14. G

    Export the same randomized query to PDF and Excel

    I have a query which selects 30 random records from my table. I want to be able to export this random listing to both a PDF file and an excel file. The issue is I'm not sure how to use VBA to export this listing to PDF & excel, and have the random records on both be the same. My query is...
  15. G

    Help with code that creates an ACCDE and Backup file

    I have a really odd problem which is likely way too specific but what the heck. I have VBA code which creates a ACCDE copy and a Backup copy of the current DB. It works perfectly fine except for a very small quirk. After executing the code and exiting out of the main DB, any Access file you...
  16. G

    Populate combobox with PDF filenames from a directory

    I am trying to populate the values of a combo box with all PDF files in a particular windows folder. I don't need it to open the file or anything when selected in the combo; just simply populate the the values with the current PDF files in a specific directory. Any suggestions?
  17. G

    Syntax Error

    I'm getting a 3075 syntax error on this line. I think I'm missing a quotation or apostrophe somewhere but can't figure it out. Here's the specific line of code. I'm trying to get a field to equal the value of a combobox strTemplate = "TemplateName = '" & Me.comboTemplate I'm getting a syntax...
  18. G

    Use IF function to identify if identical values exist in another table?

    Terrible title, I'm sorry. I have a form that looks at record one at a time. For whatever record I'm on, I want to use VBA via a command to check if that record's ComplaintNumber is listed at all in a completely separate table (tblEmployees). This table also has a ComplaintNumber field. Here's...
  19. G

    Solved Combine two identically structured update queries?

    I have two update queries that update two fields in the same table to 'N/A' if the respective field is null. Here they are: Query 1: UPDATE tblComplaints SET Location = "N/A" WHERE Location Is Null; Query 2: UPDATE tblComplaints SET Category = "N/A" WHERE Category Is Null; For simplicity...
  20. G

    Nav Pane's custom grouping keeps getting reshuffled

    I use Access as a front end for data which is stored on SQL Server. The DB has hundreds of queries, reports, forms, etc. and so I use a custom grouping for the side Nav Pane, as it's way easier to find things. For some reason on nearly a daily basis, the sorting of the items in the custom...
Top Bottom