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

Hi I have a button that runs an

Status
Not open for further replies.

EvilTwinOfAtrus

Technical User
Dec 30, 2002
56
0
0
GB
Hi

I have a button that runs an update query called 'Query1'. In my code for the button I use the 'DoCmd.SetWarnings False' command as I set my own dialogue boxes, and use the ''DoCmd.SetWarnings True' command at the end to turn it back on again at the end.

When I run an update query manually, one of the screens tells me how many rows I'm about to update. Is there anyway of displaying a dialogue box of my own, saying how many rows I'm about to update, without turning all those ugly warnings back on ;-).

Many Thanks,
Karl
 
This may seem obvious, but you are going to update based on criteria of some sort, so can you not use Dcount to count how many records meet the Criteria?



Ascii dumb question, get a dumb Ansi
 
Eh? Dcount? Sorry if I'm stupid but I have no idea what that is OR how to implement it.

Please help more :)
 
Sorry.

Send me your Update Query, and I will see if I can help based on that.

ChaZ

Ascii dumb question, get a dumb Ansi
 
Hi Karl,

I think you just need to add a couple of lines to turn the Echo Off and then On again around your action query, e.g.

DoCmd.SetWarnings False
DoCmd.Echo False, ""
DoCmd.OpenQuery "Query1", acNormal, acEdit
DoCmd.Echo True, ""
DoCmd.SetWarnings True

This should supress all the messages and warnings around your action query.

Cheers, jobo123

John Davy-Bowker
www.dbLetterWriter.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top