Textbox Values Disappearing

Jonathan2708
Member Posts: 552
Hi,
I have a form with a tab control. The form has a source table of TableA. On tab page 1 there is a tablebox linked to TableA. On tab page 2 there is a subform containing a tablebox linked to TableB.
The form also has 2 text boxes each with a source expression linked to a global variable. In code the global variables are set to the COUNT of records in TableA and TableB.
Everything works fine except when the records in TableA get emptied in code. When this happens the values in the 2 text boxes disappear, until the user clicks on tab page 2 when they re-appear. Click on tab page 1 and they disappear again.
Is there some requirement that a tablebox bound to the parent form must have at least one record in it for text boxes to display their values?
Any help appreciated,
Jonathan
I have a form with a tab control. The form has a source table of TableA. On tab page 1 there is a tablebox linked to TableA. On tab page 2 there is a subform containing a tablebox linked to TableB.
The form also has 2 text boxes each with a source expression linked to a global variable. In code the global variables are set to the COUNT of records in TableA and TableB.
Everything works fine except when the records in TableA get emptied in code. When this happens the values in the 2 text boxes disappear, until the user clicks on tab page 2 when they re-appear. Click on tab page 1 and they disappear again.
Is there some requirement that a tablebox bound to the parent form must have at least one record in it for text boxes to display their values?
Any help appreciated,
Jonathan
0
Comments
-
I have tried your case but it is working fine. Initially I have 3 records in Table A and textbox also displaying 3. when i deleted 2 records it was showing 1 record. I have written the code on Form - OnAfterGetRecord() for counting the records.
If textbox is on the form (i.e. parent ID is Form) then changing from one tab to another tab does not make any difference.0 -
Hi thanks for having a look at this. I stuck at it and have sorted it out - it was to do with form refreshing and the few tricks you have to pull when using subforms.
I have found that when using subforms, if you do a CurrForm.UPDATE against the parent form it doesn't always work properly unless the focus is on a control on the main form.
Jonathan0
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