How To Set Warning To False When Running Append Query From Macro
I have the query running ok in OpenQuery but I need there to be no warnings when it's run. I can't figure out in the macro builder how to do this (I need to do it in a macro in this case).
Thank you for taking the time to report an issue.
What's wrong... Please write below.
You are about to run a delete query that will modify data in your table You are about to delete 200 row(s) from the specified table.
You are about to run an append query that will modify data in your table Microsoft Office Access can't append all the records in the append query (150 fields to Null fue to a type conversion failure.)
lock violations validation rule violations.
This is a lot of violations for an append query.
After stop running macro get this error cannot find the 'l' you entered into the expression have checked all the table properties, form properties, query stuff, etc.
The client has asked that I make the database work for multiple factories. Without going into too much detail the same macro and append query are needed in the spin-off databases (one for each factory).
The problem is that the append query will not run in any of the spin-off databases as part of the macro although the macro itself is unchanged, but will run in isolation when it performs correctly and gives no error messages. I have run the macro with SetWarnings ON, but only get the warnings that you would normally expect.
I have pasted over the macro, the append query and the underlying select queries from the original database, but to no effect.
I've had this happen when I've hidden a column in a subform too, but if you say yes to the update layout message you don't get the warning any more. Seems it makes the columns hidden in thetable the subform is based on.
When I close the form I get a warning about saving changes to the layout of the table. I have commented out the Enabled= false lines and it gets rid of the warning. Is this a case where I should use docmd.SetwarningsFalse? Or is there another way to suppress this message.
I've had this happen when I've hidden a column in a subform too, but if you say yes to the update layout message you don't get the warning any more. Seems it makes the columns hidden in the table the subform is based on
I'm trying to automate the running of the query during the night.
I've tried a couple of ways to schedule the task with Windows Task Scheduler, although each time, it appears to start the job, but then just hang (task never completes, doesn't run the queryor macro and when I log back into Windows, the msaccess.exe process is running).
Methods I've used are:
Also, this macro is creating a table and appending data to it with each additional query. It always prompts to ask if it is okay to create the table, then asks if it is okay to append the table,etc. Is there a way to automate this? I want it to answer yes to every time it prompts for user input