Full Version: Disabling edit
UtterAccess Discussion Forums > Microsoft® Access > Access Q and A
kikir
I'm in the middle of trying to re-create a FoxPro database to Access. This is a purchase order database. Once the purchase order is entered by the user, I need to be able to lock down the entire purchase order. The only way the user can edit the purchase order is to click the edit command button and then it records their userID, name, etc...

Does anyone know how to do this????

Thanks!
Kathy
Mykal73
Set the allowedits property to false in the FormCurrent event. Then to allow edits make a command button and have the OnClick Property set allowedits = False.

FormCurrent
allowedits = false
end sub

commandbutton_onClick()
Allowedits = true
end sub

*Quick note: to save their user ID what I do is have the user put their ID into a textbox and save it with the record. Then if someone clicks the Edit Record button I have some code to erase the last person's name and force the person doing the edit to enter their own name.

Edited by: Mykal73 on 03.24.04.
kikir
Thanks, I'll try it.

Kathy
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.