Topics Search

Clear Subform and Form with Command

Clear Subform and Form with Command
Views: 132
I have a form (frmCashSales) and I have a subform which is continuous (sfrmSalesDetails) on that form. What happens is when a product is selected and added to an order it goes from a drop down on the form into a line in the subform, users can enter as many products as they like, but when they complete the order, I would like the form and subform both to be cleared so a neworder can be started.
Sponsored Links:

Similar posts...

 

Clear a form without gettingerrors

Clear a form without gettingerrors Icon
Using a form to edit detail in a subform in Access 2003. When the users open the form; the fields are populated with previous data. The form has a recordsource of a table and the subform has a recordsource of a query.

The users select invoice number from a unbound field on the main form which loads applicable data in the subform. I put a clear button on the main form to clear the fields but it gives me errors about how I can't change the record because it would cause duplicates.

How do I clear the fields when the users exit the form without gettingerrors.
 

How to clear form without setting DataEntry property to yes

How to clear form without setting DataEntry property to yes Icon
I would like to clear the data displayed in a subform with VBA using a button, similar to when you have the DataEntry property set to NO, and then has to close and open a specific form, to clear it.

In short, the data will be displayed in form until you clear it with a button - (dataentry will be yes, till you press the clear button)

My reason for doing this - when I temporarily close the main form and return later, all data captured are deleted from the subform, and I then have to check what was the last data captured, before continuing with the next lot. This wastes time.

the main form is "StocktakeF"
the subform is called : "Fis_stocktakeSF"
 

How to change the properties of a command button on a subform

How to change the properties of a command button on a subform Icon
I have a form with a subform in a tab control. on the subform I have command buttons (Add, View, Delete) the properties of these commands is set to Enabled = No.

When I click a command button on the form (Unlock) I want it to make the command buttons on the subform to become enabled.

How do I go about changing the properties of a command button on a subform?
 

Hide subform and clear the space left

Hide subform and clear the space left Icon
Is there a way to hide the subform in a main form and clear the space which is blank? I mean when I made the subform visible property to false it still takes some space in the main form, could I make it disappear completely and it did not take some space any more until I set the visible proper to true
 

how to clear highlighted fields with a command button

how to clear highlighted fields with a command button Icon
I have multiple fields in a form that use a macro event to highlight the backcolor of the field when the data is changed. I would like to be able to clear the highlighted fields with the click of a button.

I have a command button programed to save the record and would like it to clear the highlights for me as well. What is the best way to accomplish this goal?
 

Call a button on the main form from the subform

Call a button on the main form from the subform Icon
I have a Form

Command
and a subform
Order

I use the subform to order some mats to get the job done and I want the production_date on the Command Main form to be the latest date from the subform field Reception_Date to be my production date.

So I did a button on the main form(Command) that does this.BUT!

I want to enter some code in the On change Reception date from the subform to call my button code. and I can't do it.
 

Clear selected value in combo box

Clear selected value in combo box Icon
I have a combo box on a form. The user selects a value then presses a command button and opens a form. When the user closes the form returning to the 1st form again, I'd like the combo box to be clear again.

I've tried putting me.combobox=null in just about every event the main form has but nothing works. Is there a way to clear this without putting me.combobox=null in the On Click event of the command button? I have quite a few command buttons on that form and don't want to have to put the code in all of them if I don't have to.
 

Command button code to clear form

Command button code to clear form Icon
I would like to have a command buttom on my form and on click clear all entries. Please help with the code?
 

Subforms on form

Subforms on form Icon
The database I have created has a large subform on it, which is a table for me to enter in information for that record, but I'm having problems with it.

When I open the form I add data to the form and subform, but when I click the button for a new record it makes a new one and clears the writing so I can fill out the new record. But it does not do it for the subform.

How can I do it so that when I click new record it will clear the data on the form and subform, so that when I switch through the records then the data will change showing the correct information in the subform?
 

Preview Report Command That Can Do More

Preview Report Command That Can Do More Icon
Access 2010 - I have a search form where end users enter parameters. I used the command wizard and created a preview report command button so the report tab comes up in preview mode just fine.

I also created a Clear Entry command button that works. However if I leave the report open in preview mode and go back to the form tab, hit the Clear Entry button, then enter new parameters, the report data doesn't change from the previous entry.

1. Will the end user have to close the report manually each time before entering new parameters?

2. If not, where is the Close Report command button? I could only find Close Form.

3. What's the code to create a command button to refresh the report?

4. Finally, can everything (preview report, clear entry, refresh data) be done using just 1 command button? Can't I add the code I need behind one command?