我在 MS Access 中做一个报告,我想使用 VB Script 来过滤我的一些数据,但我以前从未使用过它。我有一个表(查询),我想返回在线下所有订单的客户。我尝试了不同的组合,我在其中设置 ID 是否相同,只为所有在线下订单的客户添加价格。我失败得很惨。任何帮助将不胜感激。我在 JSFiddle 中创建了表的副本。例如,完成后,报告将仅包含以下客户:John Smith、Irene François、William Gedeon 和 Joshua Gonzalez,因为他们是 3 月份所有在线订单的客户。请参阅下面的链接以更好地了解数据。非常感谢。
<table border="1">
<tr>
<th width="120">Month/Year</th>
<th width="120">Customer ID</th>
<th width="120">Last Name</th>
<th width="120">First Name</th>
<th width="120">In/Out of State</th>
<th width="120">Customer Type</th>
<th width="120">Product Name</th>
<th width="120">Source of Order</th>
<th width="120">Price</th>
<th width="120">Monthly Total</th>
</tr>
<tr>
<td>March/2013</td>
<td>000357321</td>
<td>John</td>
<td>Smith</td>
<td>Resident</td>
<td>VIP</td>
<td>Natural Olive Oil</td>
<td>Online</td>
<td>$3</td>
<td>$7</td>
</tr>
<tr>
<td>March/2013</td>
<td>000357321</td>
<td>John</td>
<td>Smith</td>
<td>Resident</td>
<td>VIP</td>
<td>Cream of Coconut</td>
<td>Online</td>
<td>$4</td>
<td>$7</td>
</tr>
<tr>
<td>March/2013</td>
<td>000568354</td>
<td>Purkiss</td>
<td>Andre</td>
<td>Non-Resident</td>
<td>Regular</td>
<td>Pink Candy</td>
<td>In-Store</td>
<td>$7</td>
<td>$17</td>
</tr>
<tr>
<td>March/2013</td>
<td>000568354</td>
<td>Purkiss</td>
<td>Andre</td>
<td>Non-Resident</td>
<td>Regular</td>
<td>Organic Pasta</td>
<td>Online</td>
<td>$4</td>
<td>$17</td>
</tr>
<tr>
<td>March/2013</td>
<td>000568354</td>
<td>Purkiss</td>
<td>Andre</td>
<td>Non-Resident</td>
<td>Regular</td>
<td>Challah Bread</td>
<td>Phone Order</td>
<td>$6</td>
<td>$17</td>
</tr>
<tr>
<td>March/2013</td>
<td>025999248</td>
<td>François</td>
<td>Irene</td>
<td>Resident</td>
<td>Regular</td>
<td>Bottle Opener</td>
<td>Online</td>
<td>$8</td>
<td>$21</td>
</tr>
<tr>
<td>March/2013</td>
<td>025999248</td>
<td>François</td>
<td>Irene</td>
<td>Resident</td>
<td>Regular</td>
<td>Key Chain</td>
<td>Online</td>
<td>$4</td>
<td>$21</td>
</tr>
<tr>
<td>March/2013</td>
<td>025999248</td>
<td>François</td>
<td>Irenee</td>
<td>Resident</td>
<td>Regular</td>
<td>Printing Paper</td>
<td>Online</td>
<td>$5</td>
<td>$21</td>
</tr>
<tr>
<td>March/2013</td>
<td>025999248</td>
<td>François</td>
<td>Irene</td>
<td>Resident</td>
<td>Regular</td>
<td>Cho. Chip Cookies</td>
<td>Online</td>
<td>$4</td>
<td>$21</td>
</tr>
<tr>
<td>March/2013</td>
<td>091357456</td>
<td>Abramovitch</td>
<td>Tayron</td>
<td>Resident</td>
<td>VIP</td>
<td>Banana</td>
<td>Phone Order</td>
<td>$3</td>
<td>$10</td>
</tr>
<tr>
<td>March/2013</td>
<td>091357456</td>
<td>Abramovitch</td>
<td>Tayron</td>
<td>Resident</td>
<td>VIP</td>
<td>Fried Onions</td>
<td>Online</td>
<td>$7</td>
<td>$10</td>
</tr>
<tr>
<td>March/2013</td>
<td>022864295</td>
<td>Hatchner</td>
<td>Emily</td>
<td>Non-Resident</td>
<td>VIP</td>
<td>Vodka Sauce</td>
<td>In-Store</td>
<td>$5</td>
<td>$34</td>
</tr>
<tr>
<td>March/2013</td>
<td>022864295</td>
<td>Hatchner</td>
<td>Emily</td>
<td>Non-Resident</td>
<td>VIP</td>
<td>Old Cheese</td>
<td>Online</td>
<td>$8</td>
<td>$34</td>
</tr>
<tr>
<td>March/2013</td>
<td>022864295</td>
<td>Hatchner</td>
<td>Emily</td>
<td>Non-Resident</td>
<td>VIP</td>
<td>Tomatoes</td>
<td>Phone Order</td>
<td>$4</td>
<td>$34</td>
</tr>
<tr>
<td>March/2013</td>
<td>022864295</td>
<td>Hatchner</td>
<td>Emily</td>
<td>Non-Resident</td>
<td>VIP</td>
<td>Frying Pan</td>
<td>Online</td>
<td>$17</td>
<td>$34</td>
</tr>
<tr>
<td>March/2013</td>
<td>092456753</td>
<td>Gedeon</td>
<td>William</td>
<td>Non-Resident</td>
<td>Regular</td>
<td>USB Drive</td>
<td>Online</td>
<td>$2</td>
<td>$13</td>
</tr>
<tr>
<td>March/2013</td>
<td>092456753</td>
<td>Gedeon</td>
<td>Williame</td>
<td>Non-Resident</td>
<td>Regular</td>
<td>Cordless Keyboard</td>
<td>Online</td>
<td>$4</td>
<td>$13</td>
</tr>
<tr>
<td>March/2013</td>
<td>092456753</td>
<td>Gedeon</td>
<td>William</td>
<td>Non-Resident</td>
<td>Regular</td>
<td>MacBook Charger</td>
<td>Online</td>
<td>$7</td>
<td>$13</td>
</tr>
<tr>
<td>March/2013</td>
<td>000320680</td>
<td>Baltar</td>
<td>D'Anna</td>
<td>Non-Resident</td>
<td>Regular</td>
<td>Pineapple</td>
<td>In-Store</td>
<td>$3</td>
<td>$5</td>
</tr>
<tr>
<td>March/2013</td>
<td>000320680</td>
<td>Baltar</td>
<td>D'Anna</td>
<td>Non-Resident</td>
<td>Regular</td>
<td>Fresh Fish</td>
<td>Online</td>
<td>$2</td>
<td>$5</td>
</tr>
<tr>
<td>March/2013</td>
<td>04400250</td>
<td>Gonzalez</td>
<td>Joshua</td>
<td>Resident</td>
<td>VIP</td>
<td>NotePad</td>
<td>Online</td>
<td>$5</td>
<td>$19</td>
</tr>
<tr>
<td>March/2013</td>
<td>04400250</td>
<td>Gonzalez</td>
<td>Joshua</td>
<td>Resident</td>
<td>VIP</td>
<td>Plastic Binder</td>
<td>Online</td>
<td>$4</td>
<td>$19</td>
</tr>
<tr>
<td>March/2013</td>
<td>04400250</td>
<td>Gonzalez</td>
<td>Joshua</td>
<td>Resident</td>
<td>VIP</td>
<td>Box of Pencils</td>
<td>Online</td>
<td>$4</td>
<td>$19</td>
</tr>
<tr>
<td>March/2013</td>
<td>04400250</td>
<td>Gonzalez</td>
<td>Joshua</td>
<td>Resident</td>
<td>VIP</td>
<td>Au. Picture Frame</td>
<td>Online</td>
<td>$6</td>
<td>$19</td>
</tr>
</table>
JSFiddle 链接:“ http://jsfiddle.net/xqmDE/29/ ”
最好的,
ZDM