- Local time
- Today, 00:09
- Joined
- Feb 19, 2002
- Messages
- 47,035
I don't know where you were going with this but subforms don't need "framing" so get rid of the Option Group and just put the subform on the main form directly. Or, use a tab control and put the subform on the desired tab page.I disabled the Option Group control that I was using to frame the subform.
Did you at some point set warnings off and forget to set them back on? With warnings off, Access will silently discard changes if you close an object without specifically saving it first. To avoid this problem, I always use a macro to set warnings off. The macro turns the hourglass on and warnings off so if my code stops and I forget to turn the warnings back on, my cursor will be an hourglass providing me with a visual clue that warnings are off. The second macro turns warnings on and the hourglass off. You could of course write the two instructions instead of using macros but the macro provides a bit of convenience if you need to do the off/on outside of a code module.Anyone care to take a crack at explaining the bizarre behavior I was experiencing with the first several "fixes" that didn't stick beyond the current session?
The subform CONTROL needs a SourceObject to specify which form it contains. A main form does not have a SourceObject.Anyone care to take a crack at explaining the bizarre behavior I was experiencing with the first several "fixes" that didn't stick beyond the current session?
Access help has been getting steadly worse since A97. It's gotten to the point now that you can hardly get syntax using it let alone guidence. There is better organized documentation in the MSDN library.Likewise, I haven't figured out a successful strategy for navigating the in-app help system
Bad move. Everything user facing should be a form or report. You don't have events with tables and queries so you can't do anything to protect the user. Take the time to make a form. You can use the wizard to generate one that looks like a datasheet if that is the look you are going for but it will give you all the control you need. This may be the root of all the problems you have been having.I simply set the "Source Object" to the appropriate table (from a dropdown list).
In general I feel that you are over-thinking this. Access is a rapid application development environment and common things such as subforms on mainforms don't require custom code to function correctly. Don't spend a lot of time trying to figure out how you can encapsulate things, you'll give yourself a headache. Forms and Reports are class modules and work somewhat they way you would expect as you enstantiate them but going beyond that goes against the natural flow in an Access app and will lead to thousands of lines of useless code and lots of work for no gain.