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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to enable delete navigation button on form

Status
Not open for further replies.

vmon

IS-IT--Management
Feb 14, 2002
74
US
I have an A2K project on top of SQLServer and I cannot get the navigation button for deleting a record enabled. What have I not tried?

vmon
 
If the Delete button is a control on the form try this:

control.Enabled = True

You would put this code in an event procedure that trigger when you want to enable the Delete button.

If the Delete button isn't a control on the form, I can't determine what you are asking and request that you rephrase your question.

Thanks,

dz
 
It is not a control I created. The navigation buttons that are standard access buttons on datasheets to move next record, previous, last record, first record, add record. The ones that are displayed based on the Yes/No option of a datasheet. When I started working with A2K project running against a SQLServer DB I now have a new button in the record navigator which is for deleting records. It is a circle with an X in it. Problem is sometimes it is red and I can delete and sometimes it is not enabled and I don't know how or why.

vmon
 
Try checking the form properties. There is an item called "Allow Deletions" (also allow additions, allow edits, etc. etc.). If that is set to "Yes", that that's removed that as a problem.

Next, if your form is based on a query with more than one table, you may be running into trouble, because it doesn't know which record to delete.

Finally, if you just have one table, make sure you have a primary key defined on the table..it won't let you delete without it (I don't think).

Hope this helps,
Birgit
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top