Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Locking record on form 2

Status
Not open for further replies.

njwcad

Technical User
Oct 16, 2002
156
GB
Can anyone help!

I have a table based form which I would like to lock when all boxes have been filled in / completed. I have tried doing this through Macros and have spent two days continually tweaking the Macro to get it right but realised that there may be an easy way to do this such as some visual basic code. In essence, every time I open a record that has been previously locked an uneditable and every time I open a new version of form or a record that has not been locked I want it to be editable. I'm happy to achieve this through a completed yes / no completion box.

Hope this makes sense
Thanks
 
How are ya njwcad . . .

With a [blue]Checkbox in the table[/blue] of interest and included in the forms [blue]RecordSource[/blue], in the forms [purple]OnCurrent[/purple] event:
Code:
[blue]   Me.AllowEdits = Not Me![purple][b]CheckboxName[/b][/purple][/blue]

Calvin.gif
See Ya! . . . . . .
 
Now that's a nice simple solution. I wouldn't have thought of that. Have a star!

Ed Metcalfe.

Please do not feed the trolls.....
 
Thanks

The usual speedyu response and excellent help. I'll let you know how it goes


Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top