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()
'Turns off the Access warning messages
'Turns the Access warning messages back on
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.
when looking at the back drop of the button, it just takes me to the macro builder screen where I can see the 6 queries that the button is trying to run. I have looked in visual basic but cannot see any code relating to this button (hence why I am confused!) can you give me a step by step of where I should look? I have attached a print screen of the macro page.
Incidentally I am able to look at the SQL for each individual query listed in the macro but I do not know how to write or edit code in this format.
An example of the SQL code is as follows:
SELECT dbo_ITT1.Father, dbo_OITM.ItemName, dbo_OITM.U_CustName, dbo_ITT1.Code, [dbo_itt1]![quantity]/[dbo_oitt]![qauntity] AS Qty INTO [Bill of Materials3]
FROM (dbo_ITT1 LEFT JOIN dbo_OITM ON dbo_ITT1.Father = dbo_OITM.ItemCode) LEFT JOIN dbo_OITT ON dbo_ITT1.Father = dbo_OITT.Code
ORDER BY dbo_ITT1.Father;Hope this makes sense! Thanks for your help.
thank you, you are a star!! I did have an issue because my 'SetWarnings' option was not showing but I discovered that access 2007 hide this for security reasons.
For anyone else who may encounter this problem, just click on 'Show All Actions' at the top of the macro design view page.
Also a good thing to do is to put in a line underneath the 'SetWarnings Off' line for hourglass if other people will be using the database. Obviously you would then need to turn the hourgass off again before you turn the SetWarnings back on!