By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,537 Members | 1,743 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,537 IT Pros & Developers. It's quick & easy.

Null value after cleaning table

100+
P: 135
Hello i have 7 tables, 7 forms and one query calculating a total for each table. Everything works perfect but every time i delete all the records from the tables ("clean") if i run the query it returns NOTHING....NULL, empty fields, NOT even "0", which is what im expecting. Its only AFTER opening and closing the form of the "cleaned" table, that the query returns the proper "0". The easiest solution i could find was to open/close each of the forms AFTER i hit the button which deletes all the records of all the tables.

Is there any other way to "initialize" the tables so that i dont have to open/close the forms??? if not? how can i improve my current code??? Right now i CAN see that the forms are opening and closing, which i need to HIDE.

Expand|Select|Wrap|Line Numbers
  1. DoCmd.OpenForm "pricingl1v1", , , , , , acHidden
  2. Forms!PricingL1V1!PrixTotalddpew = 0
  3. DoCmd.Close acForm, "pricingl1v1"
  4. DoCmd.OpenForm "pricingl2v1", , , , , , acHidden
  5. Forms!PricingL2V1!PrixTotalddpew = 0
  6. DoCmd.Close acForm, "pricingl2v1"
  7. DoCmd.OpenForm "pricingl3v1", , , , , , acHidden
  8. Forms!PricingL3V1!PrixTotalddpew = 0
  9. DoCmd.Close acForm, "pricingl3v1"
  10. DoCmd.OpenForm "pricingl4v1", , , , , , acHidden
  11. Forms!PricingL4V1!PrixTotalddpew = 0
  12. DoCmd.Close acForm, "pricingl4v1"
  13. DoCmd.OpenForm "pricingl5v1", , , , , , acHidden
  14. Forms!PricingL5V1!PrixTotalddpew = 0
  15. DoCmd.Close acForm, "pricingl5v1"
  16. DoCmd.OpenForm "pricingl6v1", , , , , , acHidden
  17. Forms!PricingL6V1!PrixTotalddpew = 0
  18. DoCmd.Close acForm, "pricingl6v1"
  19. DoCmd.OpenForm "pricingl7v1", , , , , , acHidden
  20. Forms!PricingL7V1!PrixTotalddpew = 0
  21. DoCmd.Close acForm, "pricingl7v1"
  22.  

Thanks,
Gilberto
Nov 8 '07 #1
Share this Question
Share on Google+
3 Replies


Rabbit
Expert Mod 10K+
P: 12,365
You've got one too many commas in your DoCmd.OpenForm
Nov 8 '07 #2

100+
P: 135
You've got one too many commas in your DoCmd.OpenForm
hahahah. That was simple. Thanks, it works now.
Nov 13 '07 #3

Rabbit
Expert Mod 10K+
P: 12,365
No problem. Good luck.
Nov 13 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.