Hello All
I have a form with a button and a subform with a table box.
When pressing the button in the main form, i want to automatically update the subform with the added information.
I have tried to use currform."subform".UPDATE but i receive a message that says i cannot do this.
Any alternative?
0
Comments
When I say "update", I mean, when the button is pressed on the header of the form - (this is a new form not based on any table), it will insert records into a new table I have created (based on what the user inputs/selects etc).
When the insert is complete, I want the subform to be automatically updated (the subform is based on the table) and show the records that have just been inserted.
Any ideas would be great.....
Out of curiosity, why are you using a subform if the main form is not linked to a table? All this would be much easier to manipulate if the main form were linked to the subform table.
You can still make TableBox non-editable and use variables to present user an input/selection.
To make it easier for you to copy your variables into your record use record variable instead using one variable for a each field.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
In the subform make a procedure "UpdateRecords" with only one line of code:
UPDATE;
In the main form when you need to update the subform call this procedure like below:
CurrForm.SubForm.FORM.UpdateRecords;
That's it. You'll have the subform updated.