Search results

  1. kengooch

    Counting Parent Records and then Child Records on a Continuous Form after a filter is applied.

    I have a continuous form that is based on a child table so that all records are present. When I use the Count(*) function in an unbound text box on the form it gives me the total count of all records that are displayed on the form. However, I also need to know how many Parent records exist...
  2. kengooch

    Can't seem to call a Macro within Access

    I have two buttons on a form that are designed to clear my multi-select list boxes. I was trying to call the first macro from the 2nd button so that I wouldn't have to duplicate the code. I tried the CALL statement which works in Excel but then found a post that said in Access VBA to use...
  3. kengooch

    Filter a form with unbound text boxes that count values in a field based on the dates

    I have a From that shows a quick list of totals for various aspects of Patient data Table and it's child records. See image below. They are asking now to be able to filter these totals by month or by quarter, and by Pathologist. So my thought is to provide a start and end date and tally the...
  4. kengooch

    open an access report filtered from a form

    I have a form that has 2 unbound text boxes in which I enter vDateSt and the other one vDateEnd I also have a third combobox that looks up the last name of a Pathologist vGetPatho. I have a report that is designed to show all records between the two above dates and the select Pathologist. I...
  5. kengooch

    Solved Timed Message Box

    I often use a timed MsgBox to advise user of events that happen during code execution and always to let them know who wrote the Database or Excel App with a contact email and phone extension. The most common vba code I use is CreateObject("WScript.Shell").Popup vMsg, vSec, vTitle...
  6. kengooch

    Solved Show All Records on a Form in Access VBA

    I have a form and when I open it, I set the value of my lookup field to a value that intentionally has no records to force the user to click the ComboBox and choose their Department. The line of code being used to accomplish this is: DoCmd.SearchForRecord , "", acFirst, "[tDeptAbbrv] = " &...
  7. kengooch

    Solved Make a Mapped Drive persistent so that it restores every time you reboot

    I have an Excel Macro that Maps several drives automatically. However, every time the computer reboots, they disappear. I noted that a manual mapping of the drives there is a box to select to "Reconnect at Signin" Is there a VBA command that allows us to select that option?
  8. kengooch

    Solved Pass Form Filtered Records to a Report

    I am trying to pass the filtered results of a Form to a Report. The Form has a Combo Box that obtains it's data from the tDept Table which has two fields. tDeptAbbrv and tDeptNm Sample Values: tDeptAbbrv tDeptNm ANC Ancillary Testing Autop Autopsy...
  9. kengooch

    Solved Open a Report from a Form and pass the filter to the report

    I am trying to pass the filter from my from that I selected from an unbound Combo Box to a Report. The Unbound Combo Box obtains it's data from the tDept Table which Sample Data: The code to select the Department is below: '------------------------------------------------------------ 'Show...
  10. kengooch

    Find Last Row of a Worksheet that has variable rows

    So I have an equation that counts the number of Yes, No in a workbook, but the workbook number of rows changes each day. Here is the equation ="MWV has "&COUNTA(A3:A307)&" positive COVID Cases."&" Of those cases "&TEXT((COUNTIF(J3:J281,"*Y*")/COUNTA(A3:A307))*100,"###.#")&"% or...
  11. kengooch

    Solved Create a Child Record from a Query that Isolates Specific Parent Records?

    Is it possible to create a query or a VBA code that can read through a list of Parent records that have a Y in the Sort field and then if that is true, create a child record for that Parent record. I was trying to do it with an update query, but when I join the Parent and child tables in the...
  12. kengooch

    Export Filtered Form Results to an Excel Spreadsheet

    So I have a form that allows the user to filter by multiple criteria in Multi-Select List boxes. Once the records are filtered, I need to export them to an excel spreadsheet. I have the following code... Private Sub bToExcel_Click() 'Setup SQL Dim strSQL As String strSQL = Me.RecordSource...
  13. kengooch

    Query Staff Events, but only show the staff member once in the list

    I have a query that looks at a list of tEvents it is a child of tStaff so every staff person might have 3 or 5 or more events associated with their name. So I have two tables and the tStaff table is joined to the tEvents table by a linked field tStfLnk. So... I need to see a list of staff that...
  14. kengooch

    Prompt User for a Custom Report Name and add it to the report before opening

    I have a button on a form that allows users to create custom reports through the use of multi-select list boxes. Then there are several reporting option buttons on the form. The following code will open the report with the filtered records. Private Sub Command202_Click() 'This Code Handles the...
  15. kengooch

    Solved Form to show totals using dCount with multliple criteria

    I have a form that shows totals in several unbound text boxes. For example in my tMwvEvnt Table I only want to count records whose tEvntType =1 so I use =DCount("*","tMwvEvnt","tEvntType = 1") and it works great. But I also need to count the records where "tEvntType" = 1 and "tFacility" = 1 I...
  16. kengooch

    Set correct Drive and Folder when opening Application.Dialogue(xldialoguesaveas).show

    So I often build a file name and then open the Application.Dialogue(xldialoguesaveas).show option to allow the user to make any changes to the file name that they need to make, however, I can't get the code to open the specified directory. I found a snipit of code that is supposed to work for...
  17. kengooch

    Solved Check If Logged User is in User Table

    When someone accesses the DB, it checks their user name against a list in my VBA Code using Select Case. I am trying to move that list of users to a table that I can then add and remove users without having to change the code each time. I created a table "tUsrAth" with one field [UsrAthID]. I...
  18. kengooch

    Save an Access Report to a PDF using the Windows File SaveAs Window

    I would like to save an Access report to disk, but each user may save their files in a different folder, so though I create a default name for the file, I would like to open the windows standard SaveAs file dialogue window, paste the created file name as the default and then wait for the user to...
  19. kengooch

    Combine a Filter between vStDate and vEndDate (unbound txt boxes) on a form -w- a multi-select list box that filters by tEvType (lookup field Auto Ke)

    So I have a form that I need to be able to filter by a range of dates and by a selected value in a multi-select list box (actually using only one value at a time) vStDate and vEndDate are unbound text boxes tied to the Date Picker in access. tEvType is a look up field that that gets its values...
  20. kengooch

    Solved Using the DoCmd.SendObject loop through all records on a form

    I am trying to send an email to everyone on a form. When I open the form it asks for the Appointment date. The form then shows all people with that appointment date. I use this code and it sends an email to the first person in the list. The query (qApptPickTm) that uses a "Between [Start...
Top Bottom