Clear Subform and Form with Command
Thank you for taking the time to report an issue.
What's wrong... Please write below.
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.
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"
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?
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?
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?
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?
For formatting and space limitations, I wouldl like to keep the command button on the main form. I have tried a couple different method of changing the strLink command line to try and put focus on the subform. I have tried:
strLink = "frmSub" and strLink = Forms!MainForm!frmSub
but neither have obviously worked. I keep getting a form cannot be located error. I search the site for "strLink" threads but there was no help available.
I have a command button that allows people to access this subform. What I need is to create a command button that will take those results and export to excel. I know how to create a macroto link to that subform, but it does not filter by customer, it exports all results in the subform.