Results 1 to 5 of 5
  1. #1
    menendeza is offline Novice
    Windows 10 Office 365
    Join Date
    Dec 2021
    Posts
    1

    Conditional Update of Columns

    Greetings to all. I have a database where staff keeps tracks of uploaded documents to a government portal. The original design wasn't properly thought out so I'm trying to simplify. They have several forms called for example, Form A, Form B, Form C and they created one column for each form. If the form was uploaded they created a Choice Column where the only two options are "Blank" (because they haven't uploaded the form) and "Uploaded" when the form has been uploaded to the portal. I created a "Yes/No" Column to check "Yes" when the document is uploaded and "No" as the default value. I would like to update the columns where any entry marked as "Uploaded" in any of the forms columns is marked as "Yes" in the associated Yes/No column I created.

    What would be the best way to do this? Update Query? Macros? Any suggestion is appreciated.
    Thanks.

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,933
    I would normalise the table to start with.
    Otherwise you need an OR for each of the columns.
    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

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,725
    I agree with gasman in that you need to start with a normalized structure that meets and supports your requirement. Perhaps you could tell us more about the process(es) involved.

    This is my interpretation of your setup.
    You/your organization is required to submit some document(s) to government by a certain date.
    You or someone in your organization is tasked with completing the document/form.
    You or someone in your organization is tasked with verifying the information on the document/form.
    You or someone in your organization is tasked with sending/delivering the completed document to the government portal.
    You or someone in your organization or as a byproduct of any automation is tasked to keep a record(s) of what has been delivered and when.

    Also, consider

    Typically government processes can require "audits"/formal review from time to time for compliance to some law/mandate.
    You may need to retain records and submitted info --more than just a Yes/No a document was sent.
    You may require/develop standard operating procedures for the completion, submission and retention of documents generally.
    With some analysis of current processes and requirements, you may find that the processing of the document may just be a byproduct of performing/automating some of the main processes of your business.

    It may be helpful to describe exactly what is missing or incorrect in the current database, and keep a note as to how it could be corrected.

    You may find some of the articles in my Database Planning and Design link helpful.

    Good luck.

  4. #4
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,800
    Agree with the others, but in the interest of solving this problem, you will have to run an Update query on the table and set [Uploaded] field to "Yes" WHERE myYN_Field = True.
    FYI, tables don't have columns - those are fields.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    Join Date
    Jun 2010
    Location
    Belgium
    Posts
    1,044
    Columns and rows are correct SQL terms, just as attributes and tuples, or fields and records ;-)

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

Similar Threads

  1. Replies: 4
    Last Post: 09-01-2019, 11:19 AM
  2. Replies: 2
    Last Post: 05-17-2012, 03:52 PM
  3. conditional update
    By hklein in forum Queries
    Replies: 1
    Last Post: 04-21-2012, 10:13 AM
  4. Conditional Update Query
    By TheShabz in forum Queries
    Replies: 6
    Last Post: 01-24-2012, 12:11 AM
  5. Conditional Update query ...
    By valkyry in forum Access
    Replies: 0
    Last Post: 04-25-2007, 02:04 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