Results 1 to 3 of 3
  1. #1
    CAMc is offline Novice
    Windows 10 Access 2016
    Join Date
    Jun 2019
    Posts
    7

    Red flag fields, via text box or combo box, then generate report of red flagged items

    Hi,

    would be grateful for a bit of a steer in the easiest way of achieving the following

    I want to have various text boxes and combo boxes on a form. The form will be linked to a table.

    i want to be able to tab thru the form and when I come to values I deem to be an issue I want to be able to red flag them. Once the text box or combo box is red flagged it will then automatically turn the relevant field in the table red and then at the end of the form a button is there to generate a report of the items I have red flagged.

    i am assuming I will need to use vba and just change the background colour of the text box / combo box? So if user does certain key stroke ctrl+shift+r? Then do I need to use vba to generate a report or does access allow a report to be generate by field colour

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Color coding must be based on criteria - this means data must be available for comparison. You can have a yes/no field that 'flags' record. Then use Conditional Formatting to set backcolor of textboxes or comboboxes.

    If data must fall within certain range, this can be coded in Conditional Formatting rule.
    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.

  3. #3
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    I did something similar for a client some time ago. I don't have the details but attach a simple mockup to get you going

    the principle is to have an unbound textbox which gets populated with the recordID and the field name (or abbreviation) when the box is clicked

    the resultant string can then be used to identify record and field - that I will leave up to you how you do that, but typically I would expect to split into an array and then parse the array

    the example is just that - you need additional code to allow the user to 'unclick' and you don't want to add the same field multiple times

    you could populate an array, collection or dictionary directly rather than a string, but you will find the conditional formatting becomes much more complex.

    I've also included populating a multiselect listbox which is really only there as a novelty verification and can be removed
    Attached Files Attached Files

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

Similar Threads

  1. Replies: 1
    Last Post: 12-10-2013, 06:27 AM
  2. Replies: 8
    Last Post: 11-14-2013, 09:16 AM
  3. Replies: 3
    Last Post: 04-24-2013, 02:41 PM
  4. Get combo box value to generate report
    By chuyee17 in forum Access
    Replies: 3
    Last Post: 10-28-2011, 05:24 AM
  5. Replies: 9
    Last Post: 08-30-2011, 04:08 PM

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