Newsgroups: comp.databases.ms-access
From: dXXXfen...@bway.net (David W. Fenton)
Date: Thu, 02 Jan 2003 20:28:20 GMT
Local: Thurs, Jan 2 2003 3:28 pm
Subject: Re: Access 2000 - AllowEdits property - setting false disables change of button.
No Spam Please (Tester) wrote in
<3e147d9...@news1.homechoice.co.uk>: >Therefore this combo box has the key field assocaited with it and I never use AllowEdits because it means that even unbound combo >list each record in the table. I have to set the onfocus event to >set allowedits to be true, and then the lost focus, to the current >setting of the edit lock command button. >I can think of no other way of doing this when using the Allowedit boxes (used for finding records) are not enabled. I always create a custom collection of all the bound controls in It would work something like this: In the OnLoad event of the form: Call InitializeCollections That sub looks like this: Private Sub InitializeCollection() If (mcolFields Is Nothing) Then All it does is create a collection of all the editable controls. Assuming the controls are saved in a locked state, you need to For your EDIT button, it would be something like this: Call SetEdit That sub would look something like this: Public Sub SetEdit() InitializeCollection If (ctl.Locked) Then Set ctl = Nothing Now, I'm not sure I would use Edit/Save as my captions for the Also, if your form loads more than one record (something I wouldn't Personally, I've hardly ever implemented anything like this for I really can't conceive of a situation where you'd really want to -- You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||