Hi, it's me again, the Access Newbie!! - To re-cap for those that don't know me, I have "inherited" an Access DB, used throughout our european organisation to manage Marketing activities. This is all well and good, except that I consider myself an intermediate access user, and need to add some Advanced features!!
OK. There are 2 main tables (Main and Item/Cost), I/C is a sub-form of Main, the entries I am concerned with are in Main. here I have an approval process, whereby a manager must click an approved button, then a password, then the status is set to Approved. I want this to do a number of things, main one being Lock Item/Cost so no more additions can be made.
Currently this is the code
Private Sub Command161_Click()
Dim stPassword2 As String
stPassword2 = InputBox("Enter Password")
If stPassword2 = Record_Number Then
Status.Value = "Approved"
Else
Status.Value = "Incomplete"
End If
End Sub
my question here is how do I lock the Item/cost, I understand this is a variable in the Form itself, but I am unsure how to set it.
My second query is, I have a delete button, which runs a macro to delete records. This pops up a message box, with a warning, then access pops up a message with a warning. How though do I disable the button if the record is approved? - I don't want them deleting approved items.
---
I know this is a lot to ask, and in the past have found trawling this site is a real gold mine. Any help people can provide would be gladly appreciated.
Regards
JonathanW
OK. There are 2 main tables (Main and Item/Cost), I/C is a sub-form of Main, the entries I am concerned with are in Main. here I have an approval process, whereby a manager must click an approved button, then a password, then the status is set to Approved. I want this to do a number of things, main one being Lock Item/Cost so no more additions can be made.
Currently this is the code
Private Sub Command161_Click()
Dim stPassword2 As String
stPassword2 = InputBox("Enter Password")
If stPassword2 = Record_Number Then
Status.Value = "Approved"
Else
Status.Value = "Incomplete"
End If
End Sub
my question here is how do I lock the Item/cost, I understand this is a variable in the Form itself, but I am unsure how to set it.
My second query is, I have a delete button, which runs a macro to delete records. This pops up a message box, with a warning, then access pops up a message with a warning. How though do I disable the button if the record is approved? - I don't want them deleting approved items.
---
I know this is a lot to ask, and in the past have found trawling this site is a real gold mine. Any help people can provide would be gladly appreciated.
Regards
JonathanW