Can't get ride of a deleted control's name.

J

John O. Graybill

Hi All:

I deleted a command button (cmdOldButton) and created a new command
button (cmdNewButton) on one of the pages of a tab control. When I
attempted to assign the name of the old command button (cmdOldButton)
to the new command button (cmdNewButton) Access 2000 objected with:

"You entered a control name <cmdOldButton> which is already in use."

How can one really delete the old button name so it can be reassigned
to another instance of the control?

Thanks for any ideas.

John
 
R

Roger Carlson

John O. Graybill said:
Hi All:

I deleted a command button (cmdOldButton) and created a new command
button (cmdNewButton) on one of the pages of a tab control. When I
attempted to assign the name of the old command button (cmdOldButton)
to the new command button (cmdNewButton) Access 2000 objected with:

"You entered a control name <cmdOldButton> which is already in use."

How can one really delete the old button name so it can be reassigned
to another instance of the control?

Thanks for any ideas.

John
 
J

John O. Graybill

Never mind . . . Silly me.

Discovered that the old button name was accidentally assigned to a
textbox and that Access 2000's objection was, of course, completely
justified. Sorry.

John
 
T

Tom Wickerath

Hi John,

Something to be aware of with Access 2000:
Whenever you are wanting to delete a control on a form or report, you should first verify that
there are no event procedures associated with the control. You do this by clicking on View >
Properties with the Event tab selected. You should see the name of the control in the blue title
bar of the properties dialog. If you see any event procedures listed, then delete these first
before deleting the control. Otherwise, you can easily end up with what I call "spider webs", ie.
unused procedure code. If you do not first delete unused code, and you later attempt to create a
control with the same name and the same event procedures, you will get an ambiguous name error in
Access 2000. This was improved in Access 2002, so that you'd receive a warning when using a
wizard that generates code.

Tom
______________________________


Never mind . . . Silly me.

Discovered that the old button name was accidentally assigned to a
textbox and that Access 2000's objection was, of course, completely
justified. Sorry.

John
 
Top