Hi I am trying to run append queries that update tables. How can I code this in the simplest way possible.
To briefly explain my problem, I am working on a Bill Of Materials:
1) I have a table where I have a list of items for eg FinishedItem.
2) I have created queries for raw materials and depending on the FinishedItem's values of its fields the item gets selected in a query.
3) There are about 20 append queries that I have created, after adding a new FinishedItem I need to run all the append queries.
At present I have a form that has add item button which can allow you to add the FinishedItem. I have also got another button "update item", which on click I want it to run all the append queries one after the other so it will get the new item selected in some of the queries which will obviously be appended to its respective table.
What is the best way to code this?
At present I have the following for one of the append queries but cant seem to get past it cause I dont know how to create an enter event when the append dialog boxes come up to ask user weather to continue or not.
Public Function RunQuery()
DoCmd.OpenQuery "AppenQuery1", , acEdit
' thsi is where I wanted to create "click enter" event or
' something that does that
DoCmd.Close acQuery, "AppendQuery2", acSavePrompt
End Function
Can someone please help on this?
Thank you in advance
To briefly explain my problem, I am working on a Bill Of Materials:
1) I have a table where I have a list of items for eg FinishedItem.
2) I have created queries for raw materials and depending on the FinishedItem's values of its fields the item gets selected in a query.
3) There are about 20 append queries that I have created, after adding a new FinishedItem I need to run all the append queries.
At present I have a form that has add item button which can allow you to add the FinishedItem. I have also got another button "update item", which on click I want it to run all the append queries one after the other so it will get the new item selected in some of the queries which will obviously be appended to its respective table.
What is the best way to code this?
At present I have the following for one of the append queries but cant seem to get past it cause I dont know how to create an enter event when the append dialog boxes come up to ask user weather to continue or not.
Public Function RunQuery()
DoCmd.OpenQuery "AppenQuery1", , acEdit
' thsi is where I wanted to create "click enter" event or
' something that does that
DoCmd.Close acQuery, "AppendQuery2", acSavePrompt
End Function
Can someone please help on this?
Thank you in advance