Subforms

Snoddans
Member Posts: 5
I have this slight dilemma. The thing is I have to run 16 forms at the same time, every form is the same, but none can overlap each other, i.e. they all have to be in order. I decided to run a form with 16 subforms, eastablishing the order I want. Now, how can I set each subforms visability to false or true depending on values in a table I have created. That is if the value in the table is 8, only eight of the subforms will be displayed.
Thanks,
snoddans
Thanks,
snoddans
0
Comments
-
You will have to change the default control name to a defined name such as sfm1, sfm2, etc.
Then add code similar to the below example:
CurrForm.sfm1.Visible := MyValue = 1;
CurrForm.sfm2.Visible := MyValue = 2;
If you want to display multiple subforms at the same time, you will have to setup a CASE statement.
CASE MyValue OF
1 :
BEGIN
CurrForm.sfm1.Visible := TRUE;
CurrForm.sfm2.Visible := FALSE;
...
END;
...
END;
Hope this helps!
Bill Benefiel
NCPS,NCSD
Manager of Information Systems
Overhead Door Company of Indianapolis
billb@ohdindy.comBill Benefiel
NCPS,NCSD
Manager of Information Systems
Overhead Door Company of Indianapolis
billb@ohdindy.com0 -
An alternative would be to have a tabbed control with one subform on each tab. When the form starts, only the first one is editable. You can then make each subform editable as you go. It allows the user to go back and see what they put on earlier tabs if they need to.
Cheers,
John0
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