Topics Search

How to make cmd buttons (undo & clear) work on subforms

How to make cmd buttons (undo & clear) work on subforms
Views: 63
On the Main form I have cmd buttons that clear and undo.

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.
Sponsored Links:

Similar posts...

 

gotorecord

gotorecord Icon
I understand that 'DoCmd.GoToRecord , , acNewRec' works fine in
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.
 

Access 2007 Saving File

Access 2007 Saving File Icon
Wondering if anyone has same problem as I do and if there is a fix or trick? Access 2007 Esc and Undo together are nice to recover accidentally deleted data. My problem is that while I'm typing and accidentally delete data somehow that the Esc and Undo work against me by recovering back to some previous point in my work and not allowing me to recover what Access thinks ishelping.

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.
 

Assign a command to a variable and then run the variable?

Assign a command to a variable and then run the variable? Icon
I have a form that has two textboxes, txtStartDate & txtEndDate, that are used as criteria for a query. Also on the form are two buttons, btnRefresh & btnPrintReport. Both buttons need do to the same checking to make sure that the textboxes have dates in them.

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.
 

Save/Record/Delete buttons on a subform

Save/Record/Delete buttons on a subform Icon
How can I create the above stated buttons on subform? I have one form which all 3 subforms are incorporated, the problem is the conventional buttons aren't working.
 

Command Buttons in a Form

Command Buttons in a Form Icon
I am new to Access & trying to create a form/database, but the command buttons I added don't seem to work. I have ensured that Data Entry is checked off in properties, but suspect that there needs to be some sort of relationship established between the command buttons & the form/database.
 

Subforms and refreshing data in other subforms from ANOTHER subform....

Subforms and refreshing data in other subforms from ANOTHER subform.... Icon
I have a form with 3 subforms. Subform 1 is for adding records. Subforms 2 and 3 are for editing/viewing records. Since 2 and 3 are essentially identical, we will focus only on subforms 1 & 2 for solutions.

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.
 

Why does my Undo button become active for some changes but not others.

Why does my Undo button become active for some changes but not others. Icon
I have an Undo button on my form that is supposed to become active whenever a change is made. This works fine whenever I change a bound field.

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.
 

Deselect all checkboxes in Access 2007 form

Deselect all checkboxes in Access 2007 form Icon
I have created a split-form (Form_ChkBx)to display records in my table (MST_Table). The bottom portion of the split-form has datasheet view, the top portion has two control buttons, "Clear" & "Exit".

I would like to program the "Clear" button to loop through the form or table and deselect (clear or reset) all checkboxes.
 

Filter Multi SubForms from the mainform filter

Filter Multi SubForms from the mainform filter Icon
Here's one for the books! How u set a combo (unbound) box to pull up names from records that when the selection is chosen the subforms filter the said choice.

The subforms are link master & child SchedID.
 

Undo changes

Undo changes Icon
Learn: Undo changes in Design view, Undo changes when adding or editing records in a datasheet or form, Undo changes when adding or editing records in a data access page, Revert to a saved version of a form or report.