Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6198419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:59:40+00:00 2026-05-24T03:59:40+00:00

I am working on a personnel accountability system, and I have a question about

  • 0

I am working on a personnel accountability system, and I have a question about getting a field to display a value based on a value in another table that is a sub-report of the same form.

For instance, I have a tabbed interface, and the first tab is a snapshot of the person, vital data and such. I have a tab that lists retention information. The tab has a sub-report that links to another table that stores all of the flags (adverse actions) for employees. These two tables are linked together with a relationship, linking each flag to an individual employee.

I would like to have a field on the first tab titled FlagSnapshotdisplay either a value of Flagged or Not Flagged based on the value of the field FlagStatus from the other table. The field FlagStatus form the other table has possible values of Active, Removed, and Permanent. So again, if value in field FlagStatus in table Flags equals Active, I would like the FlagSnapshotfield in table Personnel to display Flagged. I also need to set conditions so that if the field FlagStatus in table Flagshas the value of Removed, then I need the field FlagSnapshotto display the value of Not Flagged. There are a few other values too in field FlagStatus, but only two values in the field FlagSnapshot.

Also, it is possible for one employee to have multiple flags, and I need to make sure that all of them are taken into account. If the table Flags has two or three flags for the same employee and one of them reads Removed and the other reads Active, I need the flag snapshot field to display a value of Flagged.

I apologize in advance for the long explanation. Also, this is not homework, it’s a project I am working on at work to make things more easily tracked.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T03:59:41+00:00Added an answer on May 24, 2026 at 3:59 am

    I would go with a mix of VBA and SQL, assuming you have normalized data structure (at least partially). For example, I would expect to have table FlagStatus to be a separate table and linked to other tables.

    Step 1: Add Column Priority to the FlagStatus table that lists ALL FlagStatuses:
    enter image description here

    Step 2: Create a query (GetFlagStatusQuery) that returns FlagStatus with highest priority for a particular Employee:
    enter image description here

    Step 3: Create a function that returns the desired FlagStatus representation. Something like this:

    Function GetFlagStatus(employeeId As Long) As String
    
    Dim rs As Recordset
    Dim qdf As QueryDef
    
    FlagStatus = ""
    
    Set qdf = CurrentDb.QueryDefs("GetFlagStatusQuery")
    qdf.Parameters("EmployeeId_parameter") = employeeId
    
    Set rs = qdf.OpenRecordset()
    
    If rs.RecordCount > 0 Then
        Select Case rs("FlagStatus")
        Case "Active"
            FlagStatus = "Flagged"
        Case "Removed"
            FlagStatus = "Not Flagged"
        End Select
    End If
    
    End Function
    

    Step 4: Use the GetFlagStatus function in your form/tab and pass EmployeeId parameter from the Form. For example, for a textbox control the source would be: =GetFlagStatus([EmployeeId])

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a personnel asp.Net project that has some calender based events.
I have been working as a manual tester and documentation (Test plans etc.) personnel
Been working on a personal add-in for VS 2008 and have been researching automation
I am working on a personal project based in PHP and MySQL, and I
Recently someone pointed out that my personal site was not working on ipad, because
Working with an undisclosed API, I found a function that can set the number
Working with Reporting Services 2008 r2. So here's my issue: We have 5 reports
I'm working with the ChemAxon JChem cheminformatics application to develop a web-based browsable and
I am working on a personal project as a way of learning more about
I am working on a personal project that uses a custom config file. The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.