Hello Im trying to get my code to work for deleting a row in a table from what is typed in a Text box on a Form. Im using a Button and a On Click Event.
Details:
Table name = ToolBoardKitNumT
Primary Field Name = ToolBoardKitNum
Form Name = AddToolBoardF
TextBox Name = ToolBoardKitNum (the Control Source for this box is ToolBoardKitNum Field in ToolBoardKitNumT Table)
Code:
Dim strSQL As String
'Delete record that was created but no longer needed
strSQL = "DELETE * FROM ToolBoardKitNumT WHERE ToolBoardKitNumT.ToolboardKitNum = Me.ToolBoardKitNum"
DoCmd.RunSQL strSQL
When i Click on the Button I get a "enter parameter value" Box for "Me.ToolBoardKitNum". I know im getting this pop up because it does not know what "me.ToolBoardKitNum" value is but i dont know how to make it so it works.
I want to Delete this Record from the table and not store it for later use. if they are clicking this button its because they entered this record incorrectly or the tool board is being deleted.
any ideas?
Thanks
Munroe