Results 1 to 4 of 4

Data Type Hierarchy

Threaded View

CrazyFileMaker Data Type Hierarchy 04-28-2009, 03:48 PM
rylo Re: Data Type Hierarchy 04-28-2009, 07:57 PM
shg Re: Data Type Hierarchy 04-28-2009, 08:08 PM
CrazyFileMaker Re: Data Type Hierarchy 04-29-2009, 01:02 AM
  1. #1
    Registered User
    Join Date
    03-31-2009
    Location
    Auburn Alabama
    MS-Off Ver
    Microsoft Office Excel 2007 (Windows)
    Posts
    99

    Thumbs up Data Type Hierarchy

    Hello,

    My question is about creating a hierarchy of Data Types.

    I need to code 3 Data Types:
    1.) MealPlan
    2.) Meal
    3.) MealItem

    MealPlan represents a daily meal plan. It should have a certain number of meals. An example of MealPlan would be "Healthy" and have a total of 3 meals.

    Meal represents a single meal. It should have a certain number of meal items. An example of Meal would be "Meal 1" and have a total of 3 meal items.

    MealItem represents a single meal item. It should have a certain number of protein calories, fat calories, carb calories. An example of MealItem would be "Broccoli" and have protein calories of .2, carb calories of .8, fat calories of .1

    By using Data Types, I hope to create meal plans, which are made up of meals, which are made of meal items.

    The following code creates a Data Type hierarchy for two Data Types. I've examined it closely but i'm still having a hard time recreating it for my needs as stated above.

    Type Customer
        ID As Long
        Nm As String
    End Type
    
    Type SpecialCustomer
        Spec As Customer
    End Type
    
    Sub test()
    Dim c As SpecialCustomer
    c.Spec.ID = 1
    c.Spec.Nm = "Richard"
    
    Debug.Print c.Spec.ID & " " & c.Spec.Nm
    
    End Sub
    Looking at this, I know what I'm trying to do is possible - I'm just having a difficult time of it.

    Thanks for any and all help!
    Last edited by CrazyFileMaker; 04-29-2009 at 01:03 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1