Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete query not working properly

Status
Not open for further replies.

whatisahandle

Programmer
Jul 26, 2001
18
CA
Hi Folks,

I have this Query Definition:

PARAMETERS [nom_gabarit] Text ( 255 ), [NoCompagnie] IEEEDouble;

DELETE *
FROM cat_gabarit
WHERE nom_gabarit = [nom_gabarit] and NoCompagnie = [NoCompagnie];

The query deletes all records in the table, even when I run it in design mode and Access asks for the parameter values.

In the code I run it this way (both parameters really contain values):

Set deleteCatGabarit = CurrentDb.QueryDefs("delete_Cat_gabarit")
deleteCatGabarit.Parameters![nom_gabarit] = sTemplateName
deleteCatGabarit.Parameters![NoCompagnie] = NoCompagnie
deleteCatGabarit.Execute (dbSeeChanges)

Set deleteCatGabarit = Nothing


Any ideas ?

Chris
 
[NoCompagnie] IEEEDouble; is this a type double??

If this is a floating point number, you will never get an equal using this data type. If so, change to a non-floating point number. In Access use the number datatype.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top