N
niuginikiwi
Hi all,
I have three delete buttons on main form that I would like to have them sit
of on top of each other.
I have 2 subforms in Datasheet view on a main form. Btn1 for deleting the
whole record on the form, Btn2 for delecting a selected/higlighted record in
the first subform and finally Btn3 for deleting a selected record in the
sencond subform. I have figured out a way to Delete the Selected Record using
their respective buttons.
Eg: first button has got this SQL string to delete straight from table and
that works..
But what I want to do is to have appropirate buttons being either enabled or
visible when a record is selected in a respective subform of if none is
selected then, the Btn1 which does the whole delete should be enabled/visible.
I used the on current Event off all the 3 forms with the code below but its
im not getting the hehaviour I want...
Me.Parent!btnDeletePlantingDetails.Enabled = True
Me.Parent!btnDeletePlanting.Enabled = False
Me.Parent!btnDeleteFertDetails.Enabled = False
I just want the respective button to show up when i select a record to be
deleted on a subform on a certain subform...
Thanks for any help
I have three delete buttons on main form that I would like to have them sit
of on top of each other.
I have 2 subforms in Datasheet view on a main form. Btn1 for deleting the
whole record on the form, Btn2 for delecting a selected/higlighted record in
the first subform and finally Btn3 for deleting a selected record in the
sencond subform. I have figured out a way to Delete the Selected Record using
their respective buttons.
Eg: first button has got this SQL string to delete straight from table and
that works..
But what I want to do is to have appropirate buttons being either enabled or
visible when a record is selected in a respective subform of if none is
selected then, the Btn1 which does the whole delete should be enabled/visible.
I used the on current Event off all the 3 forms with the code below but its
im not getting the hehaviour I want...
Me.Parent!btnDeletePlantingDetails.Enabled = True
Me.Parent!btnDeletePlanting.Enabled = False
Me.Parent!btnDeleteFertDetails.Enabled = False
I just want the respective button to show up when i select a record to be
deleted on a subform on a certain subform...
Thanks for any help