Results 1 to 5 of 5
  1. #1
    AMeneley is offline Novice
    Windows 11 Office 365
    Join Date
    Aug 2025
    Posts
    1

    Exclamation Form Loading/Opening Macros

    Edit to clarify what I'm doing: I am creating a FMLA tracking system in access. I want it set up so that I have an employees side that houses a list of each employee that has claims. I have two items here, a form and a report. The form allows me to add new employees, the report shows a list of those employees their employment status and a summary of how many claims they have open and/or closed. And in this report you can click on the employee ID # and open up the form record that is saved to them. This form record shows their basic information and has their closed claims listed in one tab and their closed in the other. And clicking on the claim ID # in their claim lists will pull up that form. The claim side of this will be similar, in that there is a form that allows me to fill in claim details and save record tied to a specific employee. There is also a report that is similar to the employee report so that when I click no the claim ID it will open up that claim so that I can quicky update information per pay cycle.



    That way, my team can quickly go to the employee report, see who has open claims. Click on that employee's ID and open up their form record, and open up their claim form directly from that employee form so that they can see the specific details of their individual claims and data tied to it.

    Looking at the call center template that access has is similar to what I want to accomplish but on a smaller scale. My issue that I'm having, is that when I open up my form to add a new employee it default opens up to the most recent form that I saved. I fixed that by adding a macro into the load column on the event tab of the property sheet, but then when I was in the report side of things and I clicked on the ID tied to a record it would load a blank form record. I fixed that by putting in a macro to pull up the saved record for the correct employee, but then I end up with the issue again on opening up the form to add a new employee, it ends up opening up a saved employee record instead. I have not worked with access for a very long time and only recently remembered it existed, I wanted a simpler way to track our staff who have LOA claims that wasn't an ugly mass in excel.



    I am working on a form but struggling with where and what kind of macro I should create when opening up the form. My form opens as a pop up.
    • When I double click the form I want it to open up blank so that I can fill in data and save the record. (I accomplished this with a GoToRecord macro but then when I clicked the ID in my report it loads blank)
    • The form is viewable in a report and each form has an ID field, I want to click on the ID in the report to open up that specific record.


    I keep having difficulties with separating the two macros. I had it so that I could click on the ID in the report and it would load the record (however I had failed in that no matter which ID I clicked on it opened up one specific record and not the correct record)
    But then when I would double click the form it would load up the most recent form I had recently saved.


    • In the form property sheet, where should I be putting the different macros to accomplish this?
    • In the report text box property sheet what should the macro look like?


    Some details you may need.
    • Name of Form: Add New Employee
    • Name of text box on Add New Employee form: ID
    • Name of text box on report: ID
    Last edited by AMeneley; 08-19-2025 at 03:13 PM.

  2. #2
    xps35's Avatar
    xps35 is online now Competent Performer
    Windows 10 Office 365
    Join Date
    Jun 2022
    Location
    Schiedam, NL
    Posts
    299
    I don't understand exactly what you're trying to achieve.

    If you already have an "Add New Employee" form, why would you need to do anything to add an employee? Make sure you can add them immediately when the form opens.

    The action to open a report is part of the form. Therefore, I don't understand why you'd want to use a macro on the report.

    I'm not a fan of macros. I find them too limited. I prefer working with programming code in VBA. The event when double-clicking the ID on the form could simply be
    Code:
    DoCmd.OpenReport "YourReport",,, "ID = " & me.ID
    Last edited by xps35; 08-19-2025 at 04:39 AM.
    Groeten,

    Peter

  3. #3
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,566
    O/P *might* be using the word macro for VBA code, if the come from an excel background, as that is what the events are called?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  4. #4
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,424
    The post is confusing. A report is for displaying information and is not meant for interacting with. Not saying never, just rarely. If it doesn't open to the record(s) you want, then the recordsource for the report is not correct. You need to fix that, or apply a filter to the report so that it shows the records you want to see.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 11 Access 2021
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    We need your code. You could provide db for analysis. Follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 11-15-2018, 02:23 PM
  2. Replies: 8
    Last Post: 03-12-2018, 12:07 PM
  3. Word opening in read only when loading from Access
    By andrewhoddie in forum Access
    Replies: 3
    Last Post: 06-08-2016, 02:27 PM
  4. Replies: 15
    Last Post: 03-02-2015, 09:32 AM
  5. Replies: 0
    Last Post: 02-15-2011, 01:43 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums