Darth Vodka
Registered User.
- Local time
- Today, 15:34
- Joined
- Sep 25, 2007
- Messages
- 344
aaah
error 2335 in this code:-
it seems when you assign a new sourceobject it resets the childlink & master link to one field



anyone had this before and kow how to get around it?
error 2335 in this code:-
Code:
Sub FormatGrid(strType As String)
Dim strHeaders(1) As String
Dim strSourceObjects(1) As String
Dim strChildLink As String
Dim strMasterLink As String
Const GUITABLE As String = "tbl_Static_GridGui"
strHeaders(0) = Nz(DLookup("Header1", GUITABLE, "GridHeader='" & strType & "'"), "")
strHeaders(1) = Nz(DLookup("Header2", GUITABLE, "GridHeader='" & strType & "'"), "")
strSourceObjects(0) = Nz(DLookup("Source1", GUITABLE, "GridHeader='" & strType & "'"), "")
strSourceObjects(1) = Nz(DLookup("Source2", GUITABLE, "GridHeader='" & strType & "'"), "")
strChildLink = Nz(DLookup("ChildFields", GUITABLE, "GridHeader='" & strType & "'"), "")
strMasterLink = Nz(DLookup("MasterFields", GUITABLE, "GridHeader='" & strType & "'"), "")
Me.Controls("lblGrid1").Caption = strHeaders(0)
Me.Controls("lblGrid1").Visible = True
Me.Controls("chlGrid1").SourceObject = strSourceObjects(0)
Me.Controls("chlGrid1").LinkChildFields = strChildLink
Me.Controls("chlGrid1").LinkChildFields = strMasterLink
Me.Controls("chlGrid1").Visible = True
End Sub
it seems when you assign a new sourceobject it resets the childlink & master link to one field



anyone had this before and kow how to get around it?