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!

Deleting records in subform 2

Status
Not open for further replies.

debbieg

Technical User
Dec 2, 2002
190
US
I have a form with a subform.

I have a Delete button on the subform. I only want the Delete button visible if the user is working in the subform. I've tried various events on both the form and subform but not coming up with the right event. How can I accomplish this?

Also, is there a way to highlight the current record in the subform to make it really obvious to the user which record they are deleting?

Thanks,
Debbie
 
1.In the eneter event of the subform control you can make the button visible and in the exit event make it unvisible

2.use conditional formatting to highlite the current record
 
I finally came up with the right event.

Code:
Private Sub subfrmUniv_Enter()
    Forms!frmAlumni!subfrmUniv.Form!cmdDelete.Visible = True
End Sub

Private Sub subfrmUniv_Exit(Cancel As Integer)
    Forms!frmAlumni!subfrmUniv.Form!cmdDelete.Visible = False
End Sub

But I would still like to know if there is a way to highlight the current record in the subform to make it REALLY OBVIOUS to the user which record they are deleting?

Thanks,
Debbie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top