Trouble With Access Form Controls

  • Thread starter Thread starter Chris Durant via AccessMonster.com
  • Start date Start date
C

Chris Durant via AccessMonster.com

Morning everybody,

I have a database that is used by a call centre to mark the quality of calls
taken by phone staff and score the calls appropriately.

The form uses radio buttons to select whether the CSA got a YorN for each
requirement. If a button is checked then the after update event populates a
text box with the relevent development area.

I recently had to add some extra questions to one of the forms so copied a
block of the existing controls (buttons, and text boxes), pasted them and re-
named as necessary.

However I now find that although i have used exactly the same code and
properties as for previous buttons i have 8 development area boxes (there are
64 on the form) that auto-populate with a #name error when the form is opened
and then when i try to tick one of the new buttons i get the 2448 run time
error saying i cant assign values to this control. I have had 3 other analyst
look at this and we are all pretty convinced my code is right (as it works
300+ time elsewhere on the database) but even so no one can see why it
wouldnt work.

Below is the code that i have used for the afterupdate event on all my
buttons (the only thing that changes is the name):
This one works[/QUOTE]
Private Sub TechN34_AfterUpdate()
Me!MSalesDev55 = Null
If (Me![TechN34] = -1) Then
Me!MSalesDev55 = " 55.Documents"
End If
End Sub

This one doesnt[/QUOTE]
Private Sub TechN35_AfterUpdate()
Me!MSalesDev57 = Null
If (Me![TechN35] = -1) Then
Me!MSalesDev57 = " 57.Proof Of NCD"
End If
End Sub

So i throw this out to the world hoping someone can help me out a bit here.

Many thanks in advance for any time/thought taken with this problem.

Regards

Chris
 
Chris,

To me it seems likely that the problem is unrelated to your code. Can
you confirm that MSalesDev57 is exactly the name of the textbox, and
also exactly the name of the field that the textbox is bound to. If the
name of the textbox is different from the name of the field it is bound
to, please make sure that the name of the textbox is not the same as the
name of another field in the table. If all this checks out, it is
possible there is some corruption introduced by the copy/paste of
controls, I have seen this happen. You could try deleting the
troublesome textboxes, save the form, compact/repair the database, and
then manually add the textboxes back again.

--
Steve Schapel, Microsoft Access MVP

Morning everybody,

I have a database that is used by a call centre to mark the quality of calls
taken by phone staff and score the calls appropriately.

The form uses radio buttons to select whether the CSA got a YorN for each
requirement. If a button is checked then the after update event populates a
text box with the relevent development area.

I recently had to add some extra questions to one of the forms so copied a
block of the existing controls (buttons, and text boxes), pasted them and re-
named as necessary.

However I now find that although i have used exactly the same code and
properties as for previous buttons i have 8 development area boxes (there are
64 on the form) that auto-populate with a #name error when the form is opened
and then when i try to tick one of the new buttons i get the 2448 run time
error saying i cant assign values to this control. I have had 3 other analyst
look at this and we are all pretty convinced my code is right (as it works
300+ time elsewhere on the database) but even so no one can see why it
wouldnt work.

Below is the code that i have used for the afterupdate event on all my
buttons (the only thing that changes is the name):
This one works

Private Sub TechN34_AfterUpdate()
Me!MSalesDev55 = Null
If (Me![TechN34] = -1) Then
Me!MSalesDev55 = " 55.Documents"
End If
End Sub

This one doesnt[/QUOTE]
Private Sub TechN35_AfterUpdate()
Me!MSalesDev57 = Null
If (Me![TechN35] = -1) Then
Me!MSalesDev57 = " 57.Proof Of NCD"
End If
End Sub

So i throw this out to the world hoping someone can help me out a bit here.

Many thanks in advance for any time/thought taken with this problem.

Regards

Chris
[/QUOTE]
 
In addition to this, which is a good approach, I would chekc the properties
of the fields to be sure there is not something there that is causing the
problem. Steve's approach will probably fix it and the field definition is
probably not the problem, but it can't hurt to look.

Steve Schapel said:
Chris,

To me it seems likely that the problem is unrelated to your code. Can
you confirm that MSalesDev57 is exactly the name of the textbox, and
also exactly the name of the field that the textbox is bound to. If the
name of the textbox is different from the name of the field it is bound
to, please make sure that the name of the textbox is not the same as the
name of another field in the table. If all this checks out, it is
possible there is some corruption introduced by the copy/paste of
controls, I have seen this happen. You could try deleting the
troublesome textboxes, save the form, compact/repair the database, and
then manually add the textboxes back again.

--
Steve Schapel, Microsoft Access MVP

Morning everybody,

I have a database that is used by a call centre to mark the quality of calls
taken by phone staff and score the calls appropriately.

The form uses radio buttons to select whether the CSA got a YorN for each
requirement. If a button is checked then the after update event populates a
text box with the relevent development area.

I recently had to add some extra questions to one of the forms so copied a
block of the existing controls (buttons, and text boxes), pasted them and re-
named as necessary.

However I now find that although i have used exactly the same code and
properties as for previous buttons i have 8 development area boxes (there are
64 on the form) that auto-populate with a #name error when the form is opened
and then when i try to tick one of the new buttons i get the 2448 run time
error saying i cant assign values to this control. I have had 3 other analyst
look at this and we are all pretty convinced my code is right (as it works
300+ time elsewhere on the database) but even so no one can see why it
wouldnt work.

Below is the code that i have used for the afterupdate event on all my
buttons (the only thing that changes is the name):
This one works

Private Sub TechN34_AfterUpdate()
Me!MSalesDev55 = Null
If (Me![TechN34] = -1) Then
Me!MSalesDev55 = " 55.Documents"
End If
End Sub

This one doesnt

Private Sub TechN35_AfterUpdate()
Me!MSalesDev57 = Null
If (Me![TechN35] = -1) Then
Me!MSalesDev57 = " 57.Proof Of NCD"
End If
End Sub

So i throw this out to the world hoping someone can help me out a bit here.

Many thanks in advance for any time/thought taken with this problem.

Regards

Chris
[/QUOTE]
[/QUOTE]
 
Back
Top