Page 1 of 3 123 LastLast
Results 1 to 15 of 33
  1. #1
    onlylonely is offline Competent Performer
    Windows 7 64bit Access 2013 64bit
    Join Date
    May 2017
    Posts
    110

    Bound form Issue

    Hi Guys,



    Would appreciate if anyone can help me out.

    Objective - When create a new form, i need to assign a unique number to form1.
    Issue - I've put the coding in the "LOAD FORM", but it doesn't show up in the form1 SCAR column. When i remove me.dirty on the coding, it shows up but when i create again, the numbering will be the same.

    2) I wish to update the query status to "PENDING CAPA" once the form1 submitted
    - Usually i will use coding to update set tbl........ but with this bound form, i'm not sure how to do it.

    Attached herewith the form. testing1.zip

    Thx in advance!

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    The line to save the record triggers the before update event. Since msaved is false at that point the action is undone.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2016
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    Can you describe the application this database is intended to support in simple, plain English?
    What do the tables mean and how do they relate to one another?
    What is SCAR and why is it the PK in FINCtbl?

    Just curious and want understand what the "business" is.

  4. #4
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,557
    Hi

    Not understanding what you mean by Form1 ?

    You have an F1NCForm for Data Input whose Record Source is a Query.

    I changed this so that it is Bound to the table F1NCForm

    I also moved the Is Dirty line

    See if this has fixed your problem?
    Attached Files Attached Files

  5. #5
    onlylonely is offline Competent Performer
    Windows 7 64bit Access 2013 64bit
    Join Date
    May 2017
    Posts
    110
    Hi Paul,

    So how i can overcome this issue?

    Quote Originally Posted by pbaldy View Post
    The line to save the record triggers the before update event. Since msaved is false at that point the action is undone.

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Setting msaved should work, or take out that before update code if you aren't using it as designed.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    onlylonely is offline Competent Performer
    Windows 7 64bit Access 2013 64bit
    Join Date
    May 2017
    Posts
    110
    Hi Orange,

    Ok, this whole thing is actually for Corrective action request (CAR) - Non-conformance finding.
    For example, i will issue out a CAR to a person.

    Mainpage - To link to F1NCform and listform.

    F1NCform - To input all the findings, when submit it will send to the person. (This data will store at F1NCtbl)

    Listform - When the person open the program, it will go to Mainpage and click "VIEW" the listbox, listbox can doubleclick and go to another page to answer the findings. (Not yet develop )

    Hence, i need a unique number and my unique number is ANC & YYMM & Sequence ...... every new month, it will start with a new sequence for
    example:
    For april issued CAR ANC200401 ..... ANC200402.....
    For may issued CAR .ANC200501 .... ANC200502...

    Quote Originally Posted by orange View Post
    Can you describe the application this database is intended to support in simple, plain English?
    What do the tables mean and how do they relate to one another?
    What is SCAR and why is it the PK in FINCtbl?

    Just curious and want understand what the "business" is.

  8. #8
    onlylonely is offline Competent Performer
    Windows 7 64bit Access 2013 64bit
    Join Date
    May 2017
    Posts
    110
    Hi Mike,

    Thx for helping. But it doesn't work, when you create another CAR.
    The unique number remain the same .... it will not turn to 02...



    Quote Originally Posted by mike60smart View Post
    Hi

    Not understanding what you mean by Form1 ?

    You have an F1NCForm for Data Input whose Record Source is a Query.

    I changed this so that it is Bound to the table F1NCForm

    I also moved the Is Dirty line

    See if this has fixed your problem?

  9. #9
    onlylonely is offline Competent Performer
    Windows 7 64bit Access 2013 64bit
    Join Date
    May 2017
    Posts
    110
    Hi Paul,

    I think is important to put the before update code because if we remove the before update code, everything i enter before submit it will store into the table.
    I've tried put msaved = true , but it doens't work as well.


    Code:
    Private Sub Form_Load()
    
    Dim LValue As String
    Dim A As Date
    Me.Dirty = False
    A = Now()
    
    
    MsgBox (A)
    
    
    LValue = Format(A, "YYMM")
    
    
    Forms!F1NCform.txtsequence = Format(Nz(DMax("Sequence", "Query3", "YYMM = '" & LValue & "'"), 0) + 1, "00")
    
    
    
    
    Forms!F1NCform.txtscar = "ANC" & LValue & Me.txtsequence
    
    
    msaved = True
    
    
    End Sub
    Quote Originally Posted by pbaldy View Post
    Setting msaved should work, or take out that before update code if you aren't using it as designed.

  10. #10
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    I'm not at my computer but you'd still need the code to save the record.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  11. #11
    onlylonely is offline Competent Performer
    Windows 7 64bit Access 2013 64bit
    Join Date
    May 2017
    Posts
    110
    No worries, when you have time can help me to take a look on this.

    Quote Originally Posted by pbaldy View Post
    I'm not at my computer but you'd still need the code to save the record.

  12. #12
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2016
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    Where is this project currently? Analysis? Design?
    Do you have a more complete statement of requirements?
    Providing readers with more detail of WHAT is required will help you get more specific responses and possible options of HOW you can proceed.

    Autonumbers are primarily for use by the database management system. They are not meant for user/human consumption generally. With a relational database your data should be atomic--one fact-one field. If you need a number/code for human use, you can create same by combining/concatenating atomic values.

    For context, what is it you are checking for "conformance"? What rules apply in simple terms?
    You issue a CAR to a person/company when your check shows "non-conformance".
    Your Form and List represent HOW you have used Access to represent/support your business. I'm still asking for details on the WHAT part of the requirement.

    Good luck with your project.

  13. #13
    onlylonely is offline Competent Performer
    Windows 7 64bit Access 2013 64bit
    Join Date
    May 2017
    Posts
    110
    Hi Orange,

    The form is more like a feedback form. I feedback to a person and the person will use the same form feedback to me.

    What is required?
    At this moment, i need a customize unique number. I've put into the form but it's not working.

    I'm still asking for details on the WHAT part of the requirement.
    I don't understand this. What part of the requirement?


    Quote Originally Posted by orange View Post
    Where is this project currently? Analysis? Design?
    Do you have a more complete statement of requirements?
    Providing readers with more detail of WHAT is required will help you get more specific responses and possible options of HOW you can proceed.

    Autonumbers are primarily for use by the database management system. They are not meant for user/human consumption generally. With a relational database your data should be atomic--one fact-one field. If you need a number/code for human use, you can create same by combining/concatenating atomic values.

    For context, what is it you are checking for "conformance"? What rules apply in simple terms?
    You issue a CAR to a person/company when your check shows "non-conformance".
    Your Form and List represent HOW you have used Access to represent/support your business. I'm still asking for details on the WHAT part of the requirement.

    Good luck with your project.
    Attached Files Attached Files

  14. #14
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2016
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    What is the underlying business requirement in simple English?

    For example:
    A:
    ZYX Laboratories requires an employee tracking database. They want to track information about employees, the employee's job history, and their certifications. Employee information includes first name, middle initial, last name, social security number, address, city, state, zip, home phone, cell phone, email address. Job history would include job title, job description, pay grade, pay range, salary, and date of promotion. For certifications, they want certification type and date achieved.
    An employee can have multiple jobs over time, (ie, Analyst, Sr. Analyst, QA Administrator). Employees can also earn certifications necessary for their job.
    B:
    Roger Carlson's CIS 253 class wants to create a database to store information about the students in the class. Information will include student demographic information, contact information and course information and history.

    Information about the students will include name, address, city, state, zip, phone, email, fax, college major, Social Security Number, and gender. Each student can have more than one phone number, email address or fax number.

    Course Information includes course name, course number, number of credits, and grade received. Each student will take many courses in their college career. And naturally, each course will have many students enrolled.

  15. #15
    onlylonely is offline Competent Performer
    Windows 7 64bit Access 2013 64bit
    Join Date
    May 2017
    Posts
    110
    Hi Orange,

    This program develop to store the findings from auditor and the answers from the responder.
    Auditor will input information include violation, violate which requirement and objective evidence into form1 and issue it to the person.
    Responder will input containment action, root cause, corrective action and preventive action into form2.
    After input form2, it will need to go thru dept manager and quality manager for approval before proceed to implementation stage.
    In implementation stage, responder shall attach all the evidence before proceed to effectiveness review.
    Once complete effective review, dept manager and quality manager need to approve in order to close the CAR.


    Quote Originally Posted by orange View Post
    What is the underlying business requirement in simple English?

    For example:

Page 1 of 3 123 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Search bar using bound form
    By Aeonem in forum Forms
    Replies: 3
    Last Post: 01-21-2015, 08:23 AM
  2. Replies: 6
    Last Post: 01-30-2014, 05:57 PM
  3. Replies: 3
    Last Post: 07-24-2012, 03:11 PM
  4. Bound form with bound combobox
    By Jerry8989 in forum Access
    Replies: 2
    Last Post: 12-05-2011, 01:50 PM
  5. Replies: 0
    Last Post: 05-09-2010, 08:43 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