I am trying to use the following code in the DoubleClick event of a list box, lstSelectedOptions, to delete the selected option from tblProjectLockOptions.
'Remove selected option from lstSelectedOptions
DoCmd.SetWarnings (False)
DoCmd.RunSQL "DELETE FROM tblProjectLockOptions " _
& " WHERE [OptionDescription]= '" & Me![lstSelectedOption] & "'AND [MasterProjectID]= Me![txtMasterProjectID]"
DoCmd.SetWarnings (True)
lstSelectedOptions.Requery
Nothing happens. Does anybody see any errors within the SQL statement that may use the wrong syntax or any other problems?
Thanks...in advance!
Scott
'Remove selected option from lstSelectedOptions
DoCmd.SetWarnings (False)
DoCmd.RunSQL "DELETE FROM tblProjectLockOptions " _
& " WHERE [OptionDescription]= '" & Me![lstSelectedOption] & "'AND [MasterProjectID]= Me![txtMasterProjectID]"
DoCmd.SetWarnings (True)
lstSelectedOptions.Requery
Nothing happens. Does anybody see any errors within the SQL statement that may use the wrong syntax or any other problems?
Thanks...in advance!
Scott
