continuous forms and locking records

  • Thread starter Thread starter Chris Strug
  • Start date Start date
C

Chris Strug

Hi,

I gather that this is quite a popular question however I'm completely unable
to find a solution through google. So if anyone can provide a helping hand
it would be greatly appreciated.

I have an Access 2003 ADP which contains a bound continuous form. Everything
(for once) is working just fine except:

Based on the contents of one control in the form I'd like to prevent the
user from editing that record depending on the contents. I.e. if txtStatus =
"Cancelled" then prevent changes to that record.

Now I understand that by using continuous forms all I should have to do is
to test the value of the txtStatus control in the current event and enable /
disable the "allowedits" property of the form as the current event will run
for every record that gets the focus.

However it won't let me get that far. Everytime I reference a control in the
continuous form in the Current event of the form, the event runs but I get
the error message:

"Run-time error '2424':

The expression you entered has a field, control, or property name that <app
name> can't find."

I'm at a loss. Cany anyone explain what the application is doing and how I
can change it so that it will let me examine the status of the current
record and react accordingly...

Thanks

Chris.
 
Chris Strug said:
Hi,

I gather that this is quite a popular question however I'm completely unable
to find a solution through google. So if anyone can provide a helping hand
it would be greatly appreciated.

I have an Access 2003 ADP which contains a bound continuous form. Everything
(for once) is working just fine except:

Based on the contents of one control in the form I'd like to prevent the
user from editing that record depending on the contents. I.e. if txtStatus =
"Cancelled" then prevent changes to that record.

Now I understand that by using continuous forms all I should have to do is
to test the value of the txtStatus control in the current event and enable /
disable the "allowedits" property of the form as the current event will run
for every record that gets the focus.

However it won't let me get that far. Everytime I reference a control in the
continuous form in the Current event of the form, the event runs but I get
the error message:

"Run-time error '2424':

The expression you entered has a field, control, or property name that <app
name> can't find."

I'm at a loss. Cany anyone explain what the application is doing and how I
can change it so that it will let me examine the status of the current
record and react accordingly...

Thanks

Chris.

It would help if you posted your code and identified the line where the
error occurs.
 
Hi people,

I just thought I would post to help out other people like myself who have
been looking for a solution to this same problem. As others have mentioned
it is likely to be a mispelled or non-existent control, however in my case
it was actually the 'Control Source' of the text box that was invalid,
producing the same error. I added the missing field to the forms 'Record
Source' and problem solved.

Dan
 
Back
Top