Hello,
I'm looking for a solution for a database that I have in which after the form is completed the entry fields are locked to not allow editing. However, in the event an edit is required, I would like a command button to to open a login form (frm_Login) validate username and password (tbl_login) then if validated, then continue to run code below. If not validated the operation cancels and message generates stating so. I'm not sure how to code this.
I'm looking for a solution for a database that I have in which after the form is completed the entry fields are locked to not allow editing. However, in the event an edit is required, I would like a command button to to open a login form (frm_Login) validate username and password (tbl_login) then if validated, then continue to run code below. If not validated the operation cancels and message generates stating so. I'm not sure how to code this.
VBA Code:
Private Sub Command265_Click()
DoCmd.OpenForm "frm_Login"
Me.Buyer.Locked = False
Me.Today_s_Date.Locked = False
Me.Need_By_Date.Locked = False
Me.Detail_Description.Locked = False
Me.Urgent_Rush.Locked = False
Me.Customer_Owned_Property.Locked = False
Me.Free_Sample.Locked = False
Me.Affect_GoodService.Locked = False
Me.Approved_Supplier.Locked = False
Me.Controlled_Unclassfied_Information.Locked = False
Me.CUI_Marked.Locked = False
Me.Document_Specifying_Supplier.Locked = False
Me.Criteria_AS.Locked = False
Me.Supplier_Name.Locked = False
Me.Supplier_Address.Locked = False
Me.Supplier_Contact.Locked = False
Me.Supplier_Website.Locked = False
Me.Supplier_Email.Locked = False
Me.Supplier_Phone.Locked = False
Me.Supplier_Fax.Locked = False
Me.Delivery_Method.Locked = False
Me.Supplier_Deliver.Locked = False
Me.Drawings_Attached.Locked = False
Me.Attached_drawing_Part.Locked = False
Me.Sent_Drawing_Part.Locked = False
Me.Approvals_Required.Locked = False
Me.Spec_Qualifications.Locked = False
Me.CUI_Safegaurd.Locked = False
Me.Supplier_Controls.Locked = False
Me.NDA_Needed.Locked = False
Me.CofC_Required.Locked = False
Me.CofA_Required.Locked = False
Me.SDS_Required.Locked = False
Me.Other_Comments.Locked = False
Me.CustomerSpecified_Supplier.Locked = False
Me.Shipping_Cost.Locked = False
Me.SupportDocs.Locked = False
Me.Drawing_Sent.Locked = False
End Sub