ShaneBrennan
Programmer
Woulds you believe I'm having a little technical difficulty using Access?<br><br>background info.<br><br>before I start on a large project I'm ensuring I can do some of the more difficult parts, before I commit my time and get egg on my face when I can;t get it working.<br><br>I've created a very small data base to manage the contents of a cupboard. The contents are stored in boxes. I've created a very simple form with a sub-form. The main form displayes the cupboard information whilst the sub-form informs the user how many boxes are held in the cupboard. All this works fine - no problems at all.<br><br>I've added a text box to the main form which contains the following command in it's Control Source, to tell me how many boxes are in the cupboard:<br><br>=DCount("[box_id]","in cupboard", "[cupboard_id] = [The_cupboard_id]"
<br><br>This also works beautifully. The problem however, is when I add/delete records to the sub-form this figure does not update. It will only update when I scroll through the main form (Cupboard details). <br><br>Does anyone out there know of a way that I can easily update this.<br><br>I have tried using:<br><br> Forms![Cupboards - mainform]![The_cupboard_id].SetFocus<br> DoCmd.RunCommand acCmdRefresh<br><br>To re-set focus back to the main forms, then refresh. This works, but the focus remains in the main form and the sub-form resets to the beginning.<br><br>I would appreciate any help on this problem. I know other will have this, cause this would solve quite a few invoice, stock control, etc. problems.<br><br>Thanks for any help in advance.<br><br>Shane Brennan<br> <p> Shane Brennan<br><a href=mailto:brennans@tcat.ac.uk>brennans@tcat.ac.uk</a><br><a href= > </a><br>