Delete query problem

fatboy95

Registered User.
Local time
Today, 13:14
Joined
Apr 2, 2002
Messages
43
I am having difficulty with a delete query. It works fine if I run it from within the query itself but if I add to a button on my form it will not delete my record. I have linked it correctly to my database. Any ideas? Thanks
 
fatboy95 said:
I am having difficulty with a delete query. It works fine if I run it from within the query itself but if I add to a button on my form it will not delete my record. I have linked it correctly to my database. Any ideas? Thanks

More detail please :)
 
Don't know if this helps but this is the query I am trying to run

DELETE tblMissile.MissileID, tblMissile.MissielTypeID, tblMissile.MLocationID, tblMissile.StatusID, tblMissile.MissileNum, tblMissile.Pri, tblMissile.EngDate, tblMissile.INEDate, tblMissile.DiscA, tblMissile.DiscB, tblMissile.DiscC, tblMissile.MNote
FROM tblMissile
WHERE (((tblMissile.MissileID)=forms!qryMType![qryMissileInfo Subform]));


It works fine when I run just the query but when I run the query from a button on the form it does not work.
 
Use the code builder to get the correct reference for the subform and parent
 
Does anyone have a link that will show me how to design my above statement into a sql that will work in VBA. I don't mind reading and would like to know how to do this. Thanks
 

Users who are viewing this thread

Back
Top Bottom