M
MosheS Singer
Guest
The following sample will help to understand the problem I am having.
I want to use an XML file in a combo drop down "C1.Win.C1List.C1Combo"
Dim myXMLfile As String = "C:\Users\" & UserName() & "\AppData\Roaming\MyCompanyName\ASerchBy.xml"
DSMnSrcBy.ReadXml(myXMLfile)
With Me.SearchBy
.Refresh()
.DataSource = DSMnSrcBy.Tables("APrSearcBy")
.Splits(0).DisplayColumns("num").Visible = 0
I got a message "DataField or Caption not found" referring to "Columns("num")"
The following code is a copy of the XML file:
<?xml version="1.0" encoding="UTF-8"?>
<dataroot xmlnsd="urn:schemas-microsoft-comfficedata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ASerchBy.xsd" generated="2018-11-22T11:49:05">
<ASerchBy>
<SearchBy>Company - Commercial</SearchBy>
<num>25</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Last Name, First, Company - Commercial</SearchBy>
<num>26</num>
</ASerchBy>
<ASerchBy>
<SearchBy>First Name, Last, Company - Commercial</SearchBy>
<num>27</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Last Name, First - Residential</SearchBy>
<num>28</num>
</ASerchBy>
<ASerchBy>
<SearchBy>First Name, Last - Residential</SearchBy>
<num>29</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Last Name, First</SearchBy>
<num>30</num>
</ASerchBy>
<ASerchBy>
<SearchBy>First Name, Last</SearchBy>
<num>31</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Last, Spouse First</SearchBy>
<num>33</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Spouse First, Last</SearchBy>
<num>34</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Street, Number</SearchBy>
<num>38</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Number, Street</SearchBy>
<num>41</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Suite, Number, Street</SearchBy>
<num>42</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Tel</SearchBy>
<num>50</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Ac, Tel</SearchBy>
<num>51</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Additional Info</SearchBy>
<num>60</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Alt. Phone</SearchBy>
<num>61</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Company, Name-Spouse</SearchBy>
<num>62</num>
</ASerchBy>
<ASerchBy>
<SearchBy>ID</SearchBy>
<num>80</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Code Id</SearchBy>
<num>90</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Group By, Classify, Code Id</SearchBy>
<num>91</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Classify, Group By, Code Id</SearchBy>
<num>92</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Date Begin, Department</SearchBy>
<num>100</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Date Begin, Department - Sort by Department</SearchBy>
<num>105</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Department, Date Begin</SearchBy>
<num>110</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Group By</SearchBy>
<num>115</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Classify</SearchBy>
<num>116</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Last Name, First, Balance</SearchBy>
<num>120</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Last Name, First, Sort by Balance</SearchBy>
<num>130</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Balance, Last Name, First</SearchBy>
<num>140</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Department - Date Begin, Name, Balance, Status</SearchBy>
<num>150</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Date Begin, Name, Balance, Status</SearchBy>
<num>151</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Invoice Number</SearchBy>
<num>160</num>
</ASerchBy>
</dataroot>
Continue reading...
I want to use an XML file in a combo drop down "C1.Win.C1List.C1Combo"
Dim myXMLfile As String = "C:\Users\" & UserName() & "\AppData\Roaming\MyCompanyName\ASerchBy.xml"
DSMnSrcBy.ReadXml(myXMLfile)
With Me.SearchBy
.Refresh()
.DataSource = DSMnSrcBy.Tables("APrSearcBy")
.Splits(0).DisplayColumns("num").Visible = 0
I got a message "DataField or Caption not found" referring to "Columns("num")"
The following code is a copy of the XML file:
<?xml version="1.0" encoding="UTF-8"?>
<dataroot xmlnsd="urn:schemas-microsoft-comfficedata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ASerchBy.xsd" generated="2018-11-22T11:49:05">
<ASerchBy>
<SearchBy>Company - Commercial</SearchBy>
<num>25</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Last Name, First, Company - Commercial</SearchBy>
<num>26</num>
</ASerchBy>
<ASerchBy>
<SearchBy>First Name, Last, Company - Commercial</SearchBy>
<num>27</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Last Name, First - Residential</SearchBy>
<num>28</num>
</ASerchBy>
<ASerchBy>
<SearchBy>First Name, Last - Residential</SearchBy>
<num>29</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Last Name, First</SearchBy>
<num>30</num>
</ASerchBy>
<ASerchBy>
<SearchBy>First Name, Last</SearchBy>
<num>31</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Last, Spouse First</SearchBy>
<num>33</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Spouse First, Last</SearchBy>
<num>34</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Street, Number</SearchBy>
<num>38</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Number, Street</SearchBy>
<num>41</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Suite, Number, Street</SearchBy>
<num>42</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Tel</SearchBy>
<num>50</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Ac, Tel</SearchBy>
<num>51</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Additional Info</SearchBy>
<num>60</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Alt. Phone</SearchBy>
<num>61</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Company, Name-Spouse</SearchBy>
<num>62</num>
</ASerchBy>
<ASerchBy>
<SearchBy>ID</SearchBy>
<num>80</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Code Id</SearchBy>
<num>90</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Group By, Classify, Code Id</SearchBy>
<num>91</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Classify, Group By, Code Id</SearchBy>
<num>92</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Date Begin, Department</SearchBy>
<num>100</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Date Begin, Department - Sort by Department</SearchBy>
<num>105</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Department, Date Begin</SearchBy>
<num>110</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Group By</SearchBy>
<num>115</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Classify</SearchBy>
<num>116</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Last Name, First, Balance</SearchBy>
<num>120</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Last Name, First, Sort by Balance</SearchBy>
<num>130</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Balance, Last Name, First</SearchBy>
<num>140</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Department - Date Begin, Name, Balance, Status</SearchBy>
<num>150</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Date Begin, Name, Balance, Status</SearchBy>
<num>151</num>
</ASerchBy>
<ASerchBy>
<SearchBy>Invoice Number</SearchBy>
<num>160</num>
</ASerchBy>
</dataroot>
Continue reading...