append query

vrmomo

New member
Local time
Today, 06:24
Joined
Jun 19, 2006
Messages
5
I created this pretty neat form that does some calculations....
I also created a very simple append query for it, but I have no idea on how to creat a button on the form to run the append query.:confused:

please help

thanks
 
Put this code behind the OnClick event of your command button; If you want to see the warnings (for a test run) put ' in front of the 2 lines that relate to SetWarnings.

Code:
DoCmd.SetWarnings False ' This will turn off Access warnings
DoCmd.OpenQuery "QueryName"
DoCmd.SetWarnings True ' This will turn them back on.

P.S. Just a question, Are you storing the result of your calculations in a table?
 
Yes, I want to store certain results (not all) of my calculations

thanks

John
 
You should not store calculations in a table, however it is your database and your can do what you wish.

P.S. Did this work:
Code:
DoCmd.SetWarnings False ' This will turn off Access warnings
DoCmd.OpenQuery "QueryName"
DoCmd.SetWarnings True ' This will turn them back on.
 
Yeah, it worked perfectly, thanks.

can you explain why its not a good idea to store calculations in a table??? Sorry if this is a noob question, but me not know too much about access ;)
 
vrmomo said:
Yeah, it worked perfectly, thanks.

can you explain why its not a good idea to store calculations in a table??? Sorry if this is a noob question, but me not know too much about access ;)

Do a search here on "store calculations in a table" and you find plenty of explanationsfrom the Access Gurus as to why you should not do it.

Click the link below and then go the the last post by Pat Hartman (she is a Guru+) and read what she says.

Click Here
 

Users who are viewing this thread

Back
Top Bottom