Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 17th, 2011, 06:49 AM
Registered User
 
Join Date: Aug 2011
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Question Make-Table Warning Messages

I am having a problem with my work database because due to the complexity of the queries / macro's etc...whenever I run the update button a vast number of warning messages pop up.

The button is linked to a macro which runs 6 make-table queries.

The problem I have is because I did not create the database, I have no idea where to start to turn these warnings off.

On investigating, I am told that the following code would sort it out, however, I have no idea where to put this code!

Private Sub cmdRunMakeTable_Click()
DoCmd.Hourglass True
'Turns off the Access warning messages
DoCmd.SetWarnings False
DoCmd.OpenQuery "mktqry_MakeNewTable"
DoCmd.Hourglass False
'Turns the Access warning messages back on
DoCmd.SetWarnings True
End Sub

I did try and put the code into the SQL each query but SQL does not appear to like this Syntax.

If anyone could help me, that would be appreciated.
 
Old August 17th, 2011, 12:09 PM
gjgriffith's Avatar
Wrox Author
 
Join Date: Jul 2009
Posts: 110
Thanks: 5
Thanked 14 Times in 14 Posts
Talking Call the SetWarnings Macro, instead of using VBA code

Hello reidynem,

Thank you for posting your question about Access. Specifically, you asked:

Quote:
The button is linked to a macro which runs 6 make-table queries. ... On investigating, I am told that the following code would sort it out, however, I have no idea where to put this code!
Ok, so in this case, in your macro, you can just disable the warnings through the macro, instead of through code. Specifically, before you call the make table queries, first call the macro "SetWarnings" and set it to the value "False". Then, after the queries are run, call the "SetWarnings" macro again and set it to "True" to re-enable the warnings. Does this make sense?

Hopefully that answers your questions, but if there is anything else i can do to help, please let me know!

Thanks,
__________________
Geoffrey L. Griffith
http://www.ImagineThought.com

Wrox Author of:
Microsoft Access 2010 24-Hour Trainer
Access 2010 Programmer's Reference
Access 2007 VBA Programmer's Reference

*** Please click the THANKS button (to the right) if this post helped you! *** ---------------------------------------------------------------------------------------------------------->
 
Old August 18th, 2011, 03:28 AM
Registered User
 
Join Date: Aug 2011
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks so much, all sorted!!
 
Old August 18th, 2011, 10:26 AM
gjgriffith's Avatar
Wrox Author
 
Join Date: Jul 2009
Posts: 110
Thanks: 5
Thanked 14 Times in 14 Posts
Default Glad to hear the SetWarnings Macro worked for you!

Hello reidynem,

Awesome, I'm so glad to hear that using the SetWarnings Macro to disable and enable warning messages in Access worked for you! The SetWarnings functionality is certainly useful in both VBA code and Macros! And if there is anything else i can do help, please let me know...

Cheers,
__________________
Geoffrey L. Griffith
http://www.ImagineThought.com

Wrox Author of:
Microsoft Access 2010 24-Hour Trainer
Access 2010 Programmer's Reference
Access 2007 VBA Programmer's Reference

*** Please click the THANKS button (to the right) if this post helped you! *** ---------------------------------------------------------------------------------------------------------->
 
Old August 22nd, 2011, 10:13 AM
Registered User
 
Join Date: Aug 2011
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default calender linked to query

well now you come to mention it gjgriffith, I would like some further help if possible?!

I have a union query which is all our open orders and I would like to display these on a calender in a form. I know how to get a calender in the form design view but I do not know how to a) link it to a query or then b) make the orders appear in the various dates on the calender.

What I am ultimately aiming for is to be able to see at a glance, what orders are due when.

Thanks!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Make Table Query CongoGrey Access 2 June 1st, 2007 06:22 AM
Make a table Queries iisha64 Access VBA 2 March 15th, 2007 07:24 AM
Can a Make Table Query produce a Linked table? kronik Access 5 May 16th, 2006 06:17 AM
Make Table query : table in Another Database marnik Access 1 March 19th, 2005 12:39 PM
Warning Messages Varg_88 Beginning VB 6 1 June 8th, 2004 12:10 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.