Results 1 to 8 of 8
  1. #1
    ShaunG is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jan 2018
    Posts
    237

    how to create a form that will let me alter a records once

    I have a receive goods entry form that is recorded to a query.... when goods are received open form search the order number, which will come up with the ordered details to be double checked and then enter that it has been received...



    I have locked all the fields bar the received goods so they cant be tampered with, but when turn edits off because the query has the ordered info in place I cant input the received info.

    with edits on some can accidentally change info.

    do I need to create separate querys - 1 for the received goods alone to achieve what I'm after?

    can a validation rule stop edits to records once the received fields have been populated?
    Last edited by ShaunG; 01-22-2018 at 07:54 PM.

  2. #2
    ShaunG is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jan 2018
    Posts
    237
    Click image for larger version. 

Name:	Untitled7.jpg 
Views:	13 
Size:	116.3 KB 
ID:	32329

    not sure if helps but this is form

  3. #3
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,741
    You are going to have to determine if the record is locked for each record as it is displayed.
    Add a field to the table, bLocked. Add it to your query and the form.
    Then on your form, when the 'received by' or whatever is updated, set the bLocked to TRUE.

    Then in the Form_Current event,
    Check bLocked, and if true, disable all the appropriate controls.

  4. #4
    ShaunG is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jan 2018
    Posts
    237
    Quote Originally Posted by davegri View Post
    You are going to have to determine if the record is locked for each record as it is displayed.
    Add a field to the table, bLocked. Add it to your query and the form.
    Then on your form, when the 'received by' or whatever is updated, set the bLocked to TRUE.

    Then in the Form_Current event,
    Check bLocked, and if true, disable all the appropriate controls.
    I had to change the above a little as I found this wasn't adequate.. one order may have 2 or 3 items that might come in at different times.

    ive added a subform of the ordered items to the above form....... and created a hyperlink from that item which opens a single form with just that items details.

    I was working on a separate lock / unlock button which I actually just posted in programming thread.

    I believe what you have should work being its all on one form, will it also disable the check box?

  5. #5
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,741
    I believe what you have should work being its all on one form, will it also disable the check box?
    Don't show a check box. If you're referring to bLocked, the visible property can be NO.

  6. #6
    ShaunG is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jan 2018
    Posts
    237
    How does this look?

    Private Sub Form_Current()
    If Me.OrderComplete = True Then
    [Forms]![sfRecievedGoods]![DateReceived].Enabled = False
    [Forms]![sfRecievedGoods]![QtyReceived].Enabled = False
    [Forms]![sfRecievedGoods]![Employee].Enabled = False
    [Forms]![sfRecievedGoods]![OrdersComplete].Enabled = False
    End If
    End Sub

  7. #7
    ShaunG is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jan 2018
    Posts
    237
    Quote Originally Posted by davegri View Post
    Don't show a check box. If you're referring to bLocked, the visible property can be NO.
    yeah I was referring to it.... sorry im a little confused if the check box is invisible how is it checked once the data is updated?

  8. #8
    ShaunG is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jan 2018
    Posts
    237
    Quote Originally Posted by davegri View Post
    Don't show a check box. If you're referring to bLocked, the visible property can be NO.
    just mucked around with and its working mate cheers for the help....

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

Similar Threads

  1. Form to Create New Records
    By kwooten in forum Forms
    Replies: 31
    Last Post: 08-28-2017, 04:34 PM
  2. Auto update/alter text on form
    By Alsail77 in forum Access
    Replies: 1
    Last Post: 08-16-2012, 02:19 PM
  3. Form to Create Multiple Records
    By panza1370 in forum Forms
    Replies: 1
    Last Post: 06-11-2012, 02:48 PM
  4. Create multiple records with 1 form?
    By bergjes in forum Forms
    Replies: 4
    Last Post: 04-14-2010, 06:16 AM
  5. Trying to create multiple records from a form
    By ed_hollywood in forum Forms
    Replies: 4
    Last Post: 04-02-2010, 10:57 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