Results 1 to 6 of 6
  1. #1
    syrch is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2018
    Posts
    3

    Making a data point in one form highlight based on the data on another form.

    Hi gang, i've been out of the database world for a few years now and drawing a blank on how to accomplish this.

    I have a form im using for a dashboard (frmdashboard) that has a form called frmteamneeds and a form called frmteamselections. Frmteamneeds is pulling from tblTeamNeeds which has TeamID and Position are related data fields for qryTeamDraft.



    when a team gets a position filled i want that position to highlight or change font color (conditional formatting) on my frmteamneeds form. I did try using conditional formatting where the field value is equal to Forms![frmDashboard]![frmTeamDraft].Form![POS] however it only works for the first selected position. I believe I need a dlookup with a where claus but can't figure out how to make it work.

  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Can you post what you tried and what the result was? And is this a navigation form or a form with 2 subforms? I think the former.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    syrch is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2018
    Posts
    3
    Correct this is a form with three subforms but only two im trying to solve this issue with. I've attached the entire form and in the first picture you can see the first need is in red meaning it has been fulfilled. I did that with conditional formatting shown in the second pic. Click image for larger version. 

Name:	1.png 
Views:	10 
Size:	136.0 KB 
ID:	33653Click image for larger version. 

Name:	2.png 
Views:	10 
Size:	12.5 KB 
ID:	33654Click image for larger version. 

Name:	3.png 
Views:	10 
Size:	133.9 KB 
ID:	33655

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Yes, this will need DLookup() or DCount(). Domain Aggregate function pulls data from table or query, not form. Something like:

    Expression Is: Not IsNull(DLookup("PlayerID", "TeamSelections", "Position='QB' AND Team=" & [TeamID]))

    or

    Expression Is: DCount("PlayerID", "TeamSelections", "Position='QB' AND Team=" & [TeamID])<>0
    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.

  5. #5
    syrch is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2018
    Posts
    3
    would it be instead of teamselections it would be qryteamselections or frmteamselections?

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Reference whatever table or query has the data. As I said, cannot reference form.
    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: 9
    Last Post: 03-01-2017, 10:00 AM
  2. Replies: 14
    Last Post: 01-15-2016, 01:36 PM
  3. Replies: 27
    Last Post: 11-16-2015, 11:51 AM
  4. Replies: 6
    Last Post: 04-04-2015, 08:10 AM
  5. Replies: 7
    Last Post: 09-15-2014, 11:55 AM

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