Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using A User-Defined Type Inside Another UDT

Status
Not open for further replies.

0CODE

Programmer
Feb 8, 2004
63
CA
Hello, I am getting a compile error because of this... I have this type i created:

Public Type Customer_Fields
FirstName As String
LastName As String
PhoneNumber As String
Email As String
Country As String
State As String
City As String
Address As String
PostalCode As String
Website As String
Personality As Integer
Notes As String
OrdersInProgress() As Product_Fields
'FinishedOrders() As UDFProducts
ID As Long
End Type


-------------------------------------
I also have another user-defined type called "Product_Fields" and as you can see the "OrderInProgress" is set to this type. Looks fine but when I run I receive this error:

Compile Error:
Forward reference to user-defined type

and highlights the line where I set the OrderInProgress property to my product type. Any comments/suggestions/tips etc would be greatly appreciated. Thank You.

 
Try simply putting the definition of the Product_Fields type above the definition of the OrderInProgress type.
That way the compiler should compile everything in the correct dependancy order.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top