Results 1 to 4 of 4
  1. #1
    Perimeter is offline Novice
    Windows 10 Office 365
    Join Date
    Feb 2023
    Posts
    11

    Is it possible for a form to be updated based on data in a field?

    This is purely a cosmetic, preference type thought and would like to know what the experts here would say.

    I have an "Update form" that Upon searching for and selecting a unique Serial Number it displays the data of the record allowing only edits to certain fields.
    Works great for 99% of our records.

    In this form there is a section displaying "Fail Date Fail Code Reason and QTY"

    We do have a few products from time to time that have multiple failures.

    Is there a way upon selecting the serial number and Access populating the fields listed to check if there is data in the 2nd failure, 3rd failure, etc etc and have it auto-magically expand the form to include that data?

    I threw together a pic of the standard form listing a single failure (like i mentioned this is 99% of my database)
    and another showing what i'd like to see after selecting a serial number that has 3 failures.
    Obviously all these fields would have data in them..
    Click image for larger version. 

Name:	SingleFails.jpg 
Views:	14 
Size:	40.9 KB 
ID:	49809 Click image for larger version. 

Name:	MultiFails.jpg 
Views:	14 
Size:	43.4 KB 
ID:	49810



    Any insight would be great.
    It should also be noted that I am fairly new to Access, so a minor breakdown of the process, if there is one, would be appreciated.

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,614
    Yes it is possible. It is usually done using tables in a one to many relationship. In tis case you would have two tables. The first, a table with data about Serial Numbers would represent the "one" part of the relationship. You might call this tblSerialNums. It might have fields called:
    SerialID (Auto-number, Primary Key)
    SerialNum (short text)
    ModNum (short text)

    The other table might be called tblFails. It might have fields called:
    FailID (Auto-number, Primary Key)
    SerialID (number) (foreign key to link to tblSerialNums)
    FailDate (date)
    Qty (Number)
    FailCode (short text)
    Reason (short text)

    Read up on relationships. Post back if you need further help.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,250
    I assume you already have a table structure similar to the one described by Bob and not a table containing multiple fields for the same entity (Failure1,Failure2, etc.). So to make the form behave like you want you need to remove Fail Date, Fail Code, Reason and Quantity fields from the form and move them to a new one that you embed as a subform linked to the main form via the Serial Number. Set the form to continuous or datasheet and now it will show you all the failure records for the selected serial #.

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  4. #4
    moke123's Avatar
    moke123 is online now Me.Dirty=True
    Windows 11 Office 365
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,879
    Another option is using a listbox.
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

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

Similar Threads

  1. Replies: 1
    Last Post: 02-21-2019, 03:39 PM
  2. Replies: 5
    Last Post: 11-27-2017, 07:09 AM
  3. Replies: 9
    Last Post: 07-11-2017, 07:51 AM
  4. Replies: 4
    Last Post: 04-06-2014, 10:01 AM
  5. Updating Report based upon Updated Form
    By kelann in forum Forms
    Replies: 4
    Last Post: 11-02-2012, 07:42 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