If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Delete rows in table from Module or Form
Hi fols
I've been trying to delete som rows from a table: in a form - wont work in a module - wont work either in a query that's called from a module - and ofcoursre , wont work --- tried this in the module Set db = CurrentDb() SQLstr = "DELETE * FROM Photos WHERE [boxId] = " & myBox & " And [magasineId] = '" & myMagsineId & "' & "" ;" CurrentDb.Execute SQLstr and this: DoCmd.RunSQL "DELETE * FROM Photos WHERE [boxId] = " & myBox & " And [magasineId] = '" & myMagsineId & "' & "" ;" --- Tried with a query that's called from the module: code in module: 'stDocname = "delMagQuery" 'DoCmd.OpenQuery stDocname, acNormal, acEdit code in query: DELETE * FROM Photos WHERE [boxId]=" & myBox & " And [magasineId]='" & myMagsineId & "' & ""; And nothing works can PLEASE someone help? Thanks in advance /Michelle |
Thread Tools | |
Display Modes | |
|
|