How to make cmd buttons (undo & clear) work on subforms
Specifically the Undo doesn't undo the subforms, just the Main form. I also am not sure how to make my clear button, clear out all controls on all 3 forms.
Thank you for taking the time to report an issue.
What's wrong... Please write below.
clearing the records in a form and presenting a fresh form for data entry for the user. I have a form which contains a few subforms. After data is
entered I need to clear the fields for new data entry, so I tried the
above code and it dosent seem to work. Is it because I am trying to clear
the records of the subform from the main form? Is there a way around
this? I really need to have the form holding all the subforms.
To me Microsoft has it backwards. I have to Save the File, then make a change, then undo it, then save it again. before the Esc and Undo cannot lose my work for me. They should haveREVERSED this process and made recovery take 4-5 steps not saving (which I do when entering technical & difficult data about every 60 seconds.
The other problem is every time I save data (large text fields) the cursor goes to the top of the field and I find only Top or Bottom choices available. The amount of time I spend saving(for sure) and getting back to where I was takes nearly as long as the data I enter between each save : ( is anyone else having this problem?
So what I'm asking is a way to save the Access file without Esc or Undo messing it up, and how to get the cursor back where it was at the time of the save. I'm guessing a macro may do itbut I'm not familiar with the vb code stuff people talk about.
I would like to make that check be done in a function. The problem is that what needs done in the If False portion is different for the two buttons.
btnRefresh will requery a subform and btnPrintReport will open a report.
What I want to do is add a record in subform 1, and then be able to immediately view that record in subform 2. However, whenever I add a record in subform 1, I do not see it when I click over to subform 2.
However, I also have unbound fields on the form. Once I change an unbound field, this appears to mess up the UnDo logic as from that point, changing a bound field no longer causes the Undo button to become active.
Ideally, I'd like the UnDo button to work with both bound and unbound fields but at least I'd like to prevent the unbound fields from messing up the UnDo for the bound fields.
I would like to program the "Clear" button to loop through the form or table and deselect (clear or reset) all checkboxes.
The subforms are link master & child SchedID.