Hello everyone.
I have a form with a subform
the subform gets its data from a query which changes using the values on combo box in the main form.
I'm using a sub from because I needed a continues style form instead of a list box.
I need to make a bottom that will delete the item selected in the subform from the main table.
I did bottom using macro but I was getting the error "The command or action 'DeleteRecord' isn't available now."
so I'm trying o write the code in VB.
this is what I have:
Code:
CurrentDb.Execute _
"DELETE FROM Weights_Centers " & _
"WHERE Weights_Centers.ID = " & Me.Add_to_Weights_SUB
but I'm getting a type mismatch error on "Me.Add_to_Weights_SUB" and I can't see why
can anyone help me out?