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

unbound form/switchboard - no delete queries?

Status
Not open for further replies.

TVTPeggy

Programmer
Apr 27, 2004
10
US
I am using an unbound form to set up command buttons to run a series of queries. Why won't it let me add a delete query to a command button? Is there a way around it?

Thanks,
TVT Peggy
 
There should be no reason why you can't assign a delete query to a command button. How are you invoking the query? Are you trying to do it with an Event Procedure or are you calling a macro that runs the query? Are you getting an error message? If so, what does it say?

[shadeshappy] Cruising the Information Superhighway
(your mileage may vary)
 
I am in design on the form. I use command button wizard, select miscellaneous and run query. Delete queries are not listed - just update, append and select. That, basically is my question. I am pretty new to that and like to keep things simple.

Thanks,
Peggy
 
Never noticed that.... however, it's not a problem. Just write this code in the OnClick event....

DoCmd.SetWarnings False
DoCmd.OpenQuery "DeleteQueryName"
DoCmd.SetWarnings True


By turning the warnings off, Access will not give the "You are about to.... " messages.

Randy
 
Thanks Randy - i think that will work. i have so little time to try these things it takes me a long time to respond.... but i do appreciate your input.

Peggy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top