Refreshing subform

david.weeks
Member Posts: 96
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?
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
-
What do you mean by "update" (ie. insert or modify?). What tables are the form and subform accessing?0
-
Hi there,
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.....0 -
Is the user inserting values into variable fields then? If so then you will have to assign the variable values to a variable of type record representing the table from the subform.
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.0 -
If you are really dealing with the same table that you are showing, you can set your table as base on the main form and use Tablebox instead of Subform.
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.®obi
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯0 -
Hi, I've met with same problem ... and have found solution (quite simple
).
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.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions