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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

delete query works but not when called from vba help

Status
Not open for further replies.

ProgramError

Programmer
Mar 2, 2005
1,027
GB
Hi all

I can run a delete query which deletes the records depending on wether there is a field with a null value with out any problem, when I just click on it. If i try using a vba command to do the same thing (see below) it will not delete the records. Do any of you have any ideas? Should I be adressing this to the VBA forum?

DoCmd.OpenQuery "qryCleanUpPartNumberTable"

where "qryCleanUpPartNumberTable" is the name of the query.

Ian Mayor (UK)
Program Error
Programming is 1% coding, 50% error checking and 49% sweat as your application bombs out in front of the client.
 
Can you share the SQL view of your query?

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top