<?xml version="1.0" ?><rss version="2.0" xmlns:ec="http://www.eggheadcafe.com"><channel><title>eggheadcafe.com VB 6.0 Unanswered Messageboard Posts</title><link>http://www.eggheadcafe.com</link><pubDate>Thu, 06 Jun 2013 07:29:01 GMT</pubDate><description>EggHeadCafe - The .NET developer's portal of choice</description><language>en-us</language><item><title><![CDATA[Pass report name in a variable]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10473680/pass-report-name-in-a-variable.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10473680/pass-report-name-in-a-variable.aspx]]></link><description><![CDATA[What is the error in the following code<br />
Dim mrepo As DataReport<br />
Set mrepo = DataReport1<br />
mrepo.Show&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10473680/pass-report-name-in-a-variable.aspx" target="_self">read more</a>]]></description><pubDate>Sun, 05 May 2013 09:53:04 GMT</pubDate></item><item><title><![CDATA[How am I able to use a back button for users to click to see previous steps in a form?]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10472976/how-am-i-able-to-use-a-back-button-for-users-to-click-to-see-previous-steps-in-a-form.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10472976/how-am-i-able-to-use-a-back-button-for-users-to-click-to-see-previous-steps-in-a-form.aspx]]></link><description><![CDATA[<p><span style="font-size: 10.5pt; font-family: verdana, sans-serif; color: black;">I have a software program I purchased. It's a small application but when the window (form) opens it has 5 different (radials) to select from to start. Once selected a choice and pressed the next button it gives you about 7 steps with new instructions in each step and with new textboxes to enter what you want in each step as well.<o:p></o:p></span></p>
<p><span style="font-size: 10.5pt; font-family: verdana, sans-serif; color: black;">
My problem is that there is a "Back Button" that takes you back each step that you went through with all the instructions and to review or change what you previously typed. nothing is deleted and you can keep clicking the back button to go clear to the beginning.<o:p></o:p></span></p>
<p><span style="font-size: 10.5pt; font-family: verdana, sans-serif; color: black;">
How is the back button coded to do this?? and how does the text box retain the text entered??<o:p></o:p></span></p>
<p><span style="font-size: 10.5pt; font-family: verdana, sans-serif; color: black;">
I'm so confused because it all seems to be taking place within the main form or Window, NOT several forms being used...<o:p></o:p></span></p>
<p><span style="font-size: 10.5pt; font-family: verdana, sans-serif; color: black;">
Thanks Corby<o:p></o:p></span></p>&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10472976/how-am-i-able-to-use-a-back-button-for-users-to-click-to-see-previous-steps-in-a-form.aspx" target="_self">read more</a>]]></description><pubDate>Mon, 25 Mar 2013 00:50:42 GMT</pubDate></item><item><title><![CDATA[Conflict between SmartUi2.Ocx And CrystalReport]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10472707/conflict-between-smartui2ocx-and-crystalreport.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10472707/conflict-between-smartui2ocx-and-crystalreport.aspx]]></link><description><![CDATA[When i install CrystalReport, Apps that useing SmartUi2.Ocx Dont work&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10472707/conflict-between-smartui2ocx-and-crystalreport.aspx" target="_self">read more</a>]]></description><pubDate>Mon, 11 Mar 2013 10:00:51 GMT</pubDate></item><item><title><![CDATA[How to filter year in two combo box. and display in listview]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10472459/how-to-filter-year-in-two-combo-box-and-display-in-listview.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10472459/how-to-filter-year-in-two-combo-box-and-display-in-listview.aspx]]></link><description><![CDATA[Dear Sir,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; I have two combo box which is populate from access 2003 database . So how to filter the &nbsp;year from one combo box with another combo box and the date display in the listview belong to the filter year only. I have tried to filter using between in query but it just display only the first combo box year only. I want it to display From which year to which year as filter. Here is the code sir .Kindly sir see what i missed.<br />
<br />
<div class="reCodeBlock" style="border: 0px solid #7f9db9; overflow-y: auto;">
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Option</code> <code style="color: #000000;">Explicit</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #008200;">'----------------------------------- Populate Combo Box ---------------------------------------</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Sub</code> <code style="color: #000000;">populatecombo()</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Dim</code> <code style="color: #000000;">con </code><code style="color: #006699; font-weight: bold;">As</code> <code style="color: #006699; font-weight: bold;">New</code> <code style="color: #000000;">ADODB.Connection</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Dim</code> <code style="color: #000000;">rs </code><code style="color: #006699; font-weight: bold;">As</code> <code style="color: #006699; font-weight: bold;">New</code> <code style="color: #000000;">ADODB.Recordset</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Dim</code> <code style="color: #000000;">str </code><code style="color: #006699; font-weight: bold;">As</code> <code style="color: #006699; font-weight: bold;">String</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #000000;">con.Open </code><code style="color: blue;">"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="</code> <code style="color: #000000;">&amp; App.Path &amp; </code><code style="color: blue;">"\Test.mdb;Persist Security Info=False;Jet OLEDB:Database Password=1234"</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #000000;">str = </code><code style="color: blue;">"select Distinct (year(DateofBirth)) as doeYear from test"</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #000000;">rs.Open str, con, adOpenForwardOnly, adLockReadOnly</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 9px !important;"><code style="color: #006699; font-weight: bold;">Dim</code> <code style="color: #000000;">x </code><code style="color: #006699; font-weight: bold;">As</code> <code style="color: #006699; font-weight: bold;">Integer</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #006699; font-weight: bold;">While</code> <code style="color: #000000;">rs.EOF = </code><code style="color: #006699; font-weight: bold;">False</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 27px !important;"><code style="color: #006699; font-weight: bold;">With</code> <code style="color: #000000;">ComboMyYear</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 48px !important;"><code style="color: #000000;">.AddItem rs!doeYear</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 30px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">With</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 30px !important;"><code style="color: #000000;">x = x + 1</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 48px !important;"><code style="color: #000000;">rs.MoveNext</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">Wend</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">ComboMyYear.ListIndex = 0</code></span></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">rs.Close</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">con.Close</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #006699; font-weight: bold;">Set</code> <code style="color: #000000;">rs = </code><code style="color: #006699; font-weight: bold;">Nothing</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #006699; font-weight: bold;">Set</code> <code style="color: #000000;">con = </code><code style="color: #006699; font-weight: bold;">Nothing</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Sub</code> <code style="color: #000000;">populatecomboFrom()</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Dim</code> <code style="color: #000000;">con </code><code style="color: #006699; font-weight: bold;">As</code> <code style="color: #006699; font-weight: bold;">New</code> <code style="color: #000000;">ADODB.Connection</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Dim</code> <code style="color: #000000;">rs </code><code style="color: #006699; font-weight: bold;">As</code> <code style="color: #006699; font-weight: bold;">New</code> <code style="color: #000000;">ADODB.Recordset</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Dim</code> <code style="color: #000000;">str </code><code style="color: #006699; font-weight: bold;">As</code> <code style="color: #006699; font-weight: bold;">String</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #000000;">con.Open </code><code style="color: blue;">"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="</code> <code style="color: #000000;">&amp; App.Path &amp; </code><code style="color: blue;">"\Test.mdb;Persist Security Info=False;Jet OLEDB:Database Password=1234"</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #000000;">str = </code><code style="color: blue;">"select Distinct (year(DateofBirth)) as doeYear from test"</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #000000;">rs.Open str, con, adOpenForwardOnly, adLockReadOnly</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 9px !important;"><code style="color: #006699; font-weight: bold;">Dim</code> <code style="color: #000000;">x </code><code style="color: #006699; font-weight: bold;">As</code> <code style="color: #006699; font-weight: bold;">Integer</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #006699; font-weight: bold;">While</code> <code style="color: #000000;">rs.EOF = </code><code style="color: #006699; font-weight: bold;">False</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 27px !important;"><code style="color: #006699; font-weight: bold;">With</code> <code style="color: #000000;">ComboFrom</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 48px !important;"><code style="color: #000000;">.AddItem rs!doeYear</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 30px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">With</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 30px !important;"><code style="color: #000000;">x = x + 1</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 48px !important;"><code style="color: #000000;">rs.MoveNext</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">Wend</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">ComboFrom.ListIndex = 0</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">rs.Close</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">con.Close</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #006699; font-weight: bold;">Set</code> <code style="color: #000000;">rs = </code><code style="color: #006699; font-weight: bold;">Nothing</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #006699; font-weight: bold;">Set</code> <code style="color: #000000;">con = </code><code style="color: #006699; font-weight: bold;">Nothing</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Sub</code> <code style="color: #000000;">populatecomboUpto()</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Dim</code> <code style="color: #000000;">con </code><code style="color: #006699; font-weight: bold;">As</code> <code style="color: #006699; font-weight: bold;">New</code> <code style="color: #000000;">ADODB.Connection</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Dim</code> <code style="color: #000000;">rs </code><code style="color: #006699; font-weight: bold;">As</code> <code style="color: #006699; font-weight: bold;">New</code> <code style="color: #000000;">ADODB.Recordset</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Dim</code> <code style="color: #000000;">str </code><code style="color: #006699; font-weight: bold;">As</code> <code style="color: #006699; font-weight: bold;">String</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #000000;">con.Open </code><code style="color: blue;">"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="</code> <code style="color: #000000;">&amp; App.Path &amp; </code><code style="color: blue;">"\Test.mdb;Persist Security Info=False;Jet OLEDB:Database Password=1234"</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #000000;">str = </code><code style="color: blue;">"select Distinct (year(DateofBirth)) as doeYear from test"</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #000000;">rs.Open str, con, adOpenForwardOnly, adLockReadOnly</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #006699; font-weight: bold;">Dim</code> <code style="color: #000000;">x </code><code style="color: #006699; font-weight: bold;">As</code> <code style="color: #006699; font-weight: bold;">Integer</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #006699; font-weight: bold;">While</code> <code style="color: #000000;">rs.EOF = </code><code style="color: #006699; font-weight: bold;">False</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 27px !important;"><code style="color: #006699; font-weight: bold;">With</code> <code style="color: #000000;">ComboUpto</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 48px !important;"><code style="color: #000000;">.AddItem rs!doeYear</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 30px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">With</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 30px !important;"><code style="color: #000000;">x = x + 1</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 48px !important;"><code style="color: #000000;">rs.MoveNext</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">Wend</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">ComboUpto.ListIndex = 0</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">rs.Close</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">con.Close</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #006699; font-weight: bold;">Set</code> <code style="color: #000000;">rs = </code><code style="color: #006699; font-weight: bold;">Nothing</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #006699; font-weight: bold;">Set</code> <code style="color: #000000;">con = </code><code style="color: #006699; font-weight: bold;">Nothing</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Private</code> <code style="color: #006699; font-weight: bold;">Sub</code> <code style="color: #000000;">cmdNewTable_Click()</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #000000;">NewTableForm.Show</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Private</code> <code style="color: #006699; font-weight: bold;">Sub</code> <code style="color: #000000;">cmdSort_Click()</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Dim</code> <code style="color: #000000;">rsview </code><code style="color: #006699; font-weight: bold;">As</code> <code style="color: #000000;">ADODB.Recordset</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Dim</code> <code style="color: #000000;">LI </code><code style="color: #006699; font-weight: bold;">As</code> <code style="color: #000000;">ListItem</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Dim</code> <code style="color: #000000;">x </code><code style="color: #006699; font-weight: bold;">As</code> <code style="color: #006699; font-weight: bold;">Integer</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Dim</code> <code style="color: #000000;">number </code><code style="color: #006699; font-weight: bold;">As</code> <code style="color: #006699; font-weight: bold;">Integer</code></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 15px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 39px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 48px !important;"><code style="color: #006699; font-weight: bold;">If</code> <code style="color: #000000;">NameCheck.Value = 1 </code><code style="color: #006699; font-weight: bold;">Then</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 60px !important;"><code style="color: #000000;">number = 1</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 60px !important;"><code style="color: #000000;">NameText.Enabled = </code><code style="color: #006699; font-weight: bold;">True</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 60px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 60px !important;"><code style="color: #006699; font-weight: bold;">Else</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 60px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 75px !important;"><code style="color: #006699; font-weight: bold;">If</code> <code style="color: #000000;">SurnameCheck.Value = 1 </code><code style="color: #006699; font-weight: bold;">Then</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 99px !important;"><code style="color: #000000;">number = 2</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 99px !important;"><code style="color: #000000;">SurnameText.Enabled = </code><code style="color: #006699; font-weight: bold;">True</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 99px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 99px !important;"><code style="color: #006699; font-weight: bold;">Else</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 99px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 108px !important;"><code style="color: #006699; font-weight: bold;">If</code> <code style="color: #000000;">AddressCheck.Value = 1 </code><code style="color: #006699; font-weight: bold;">Then</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 120px !important;"><code style="color: #000000;">number = 3</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 120px !important;"><code style="color: #000000;">AddressText.Enabled = </code><code style="color: #006699; font-weight: bold;">True</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 120px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 120px !important;"><code style="color: #006699; font-weight: bold;">Else</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 120px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 132px !important;"><code style="color: #006699; font-weight: bold;">If</code> <code style="color: #000000;">DistrictCheck.Value = 1 </code><code style="color: #006699; font-weight: bold;">Then</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 144px !important;"><code style="color: #000000;">number = 4</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 144px !important;"><code style="color: #000000;">DistrictText.Enabled = </code><code style="color: #006699; font-weight: bold;">True</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 135px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 135px !important;"><code style="color: #006699; font-weight: bold;">Else</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 144px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 156px !important;"><code style="color: #006699; font-weight: bold;">If</code> <code style="color: #000000;">StateCheck.Value = 1 </code><code style="color: #006699; font-weight: bold;">Then</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 168px !important;"><code style="color: #000000;">number = 5</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 168px !important;"><code style="color: #000000;">StateText.Enabled = </code><code style="color: #006699; font-weight: bold;">True</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 168px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 168px !important;"><code style="color: #006699; font-weight: bold;">Else</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 192px !important;"><code style="color: #006699; font-weight: bold;">If</code> <code style="color: #000000;">OccupationCheck.Value = 1 </code><code style="color: #006699; font-weight: bold;">Then</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 204px !important;"><code style="color: #000000;">number = 6</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 204px !important;"><code style="color: #000000;">OccupationText.Enabled = </code><code style="color: #006699; font-weight: bold;">True</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 204px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 204px !important;"><code style="color: #006699; font-weight: bold;">Else</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 204px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 216px !important;"><code style="color: #006699; font-weight: bold;">If</code> <code style="color: #000000;">YearCheck.Value = 1 </code><code style="color: #006699; font-weight: bold;">Then</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 228px !important;"><code style="color: #000000;">number = 7</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 228px !important;"><code style="color: #000000;">YearCheck.Enabled = </code><code style="color: #006699; font-weight: bold;">True</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 228px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 225px !important;"><code style="color: #006699; font-weight: bold;">Else</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 225px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 228px !important;"><code style="color: #006699; font-weight: bold;">If</code> <code style="color: #000000;">AllRecordCheck.Value = 1 </code><code style="color: #006699; font-weight: bold;">Then</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 240px !important;"><code style="color: #000000;">number = 8</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 228px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 228px !important;"><code style="color: #006699; font-weight: bold;">Else</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 228px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 240px !important;"><code style="color: #006699; font-weight: bold;">If</code> <code style="color: #000000;">YearFromCheck.Value = 1 </code><code style="color: #006699; font-weight: bold;">Then</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 252px !important;"><code style="color: #000000;">number = 9</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 252px !important;"><code style="color: #000000;">YearFromCheck.Enabled = </code><code style="color: #006699; font-weight: bold;">True</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 252px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 252px !important;"><code style="color: #006699; font-weight: bold;">Else</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 264px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 264px !important;"><code style="color: #006699; font-weight: bold;">If</code> <code style="color: #000000;">YearUptoCheck.Value = 1 </code><code style="color: #006699; font-weight: bold;">Then</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 276px !important;"><code style="color: #000000;">number = 10</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 276px !important;"><code style="color: #000000;">YearUptoCheck.Enabled = </code><code style="color: #006699; font-weight: bold;">True</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 276px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 270px !important;"><code style="color: #006699; font-weight: bold;">Else</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 276px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 276px !important;"><code style="color: #006699; font-weight: bold;">If</code> <code style="color: #000000;">(YearFromCheck.Value = 1 </code><code style="color: #006699; font-weight: bold;">And</code> <code style="color: #000000;">YearUptoCheck.Value = 1) </code><code style="color: #006699; font-weight: bold;">Then</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 288px !important;"><code style="color: #000000;">number = 11</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 288px !important;"><code style="color: #000000;">YearFromCheck.Enabled = </code><code style="color: #006699; font-weight: bold;">True</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 288px !important;"><code style="color: #000000;">YearUptoCheck.Enabled = </code><code style="color: #006699; font-weight: bold;">True</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 276px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">If</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 264px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">If</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 240px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">If</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 228px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">If</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 207px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">If</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 207px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 192px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">If</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 180px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 156px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">If</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 132px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">If</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 108px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">If</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 72px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">If</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 48px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">If</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 60px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 27px !important;"><code style="color: #000000;">ListView1.ListItems.Clear</code></span></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;</code><span style="margin-left: 3px !important;"><code style="color: #006699; font-weight: bold;">Set</code> <code style="color: #000000;">rsview = </code><code style="color: #006699; font-weight: bold;">New</code> <code style="color: #000000;">ADODB.Recordset</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;</code><span style="margin-left: 3px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #000000;">connect</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Select</code> <code style="color: #006699; font-weight: bold;">Case</code> <code style="color: #000000;">number</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Case</code> <code style="color: #000000;">1:</code></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 27px !important;"><code style="color: #006699; font-weight: bold;">If</code> <code style="color: #000000;">NameText.Text = </code><code style="color: blue;">""</code> <code style="color: #006699; font-weight: bold;">Then</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 39px !important;"><code style="color: #000000;">MsgBox </code><code style="color: blue;">" Please enter Initial Name : "</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 51px !important;"><code style="color: #006699; font-weight: bold;">Exit</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 36px !important;"><code style="color: #006699; font-weight: bold;">Else</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 129px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 72px !important;"><code style="color: #000000;">rsview.Open </code><code style="color: blue;">"SELECT * FROM test where (Name) like '"</code> <code style="color: #000000;">&amp; NameText.Text &amp; </code><code style="color: blue;">"%'ORDER BY Name "</code><code style="color: #000000;">, con, adOpenStatic, adLockOptimistic</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 84px !important;"><code style="color: #006699; font-weight: bold;">If</code> <code style="color: #000000;">rsview.BOF = </code><code style="color: #006699; font-weight: bold;">True</code> <code style="color: #006699; font-weight: bold;">Or</code> <code style="color: #000000;">rsview.EOF = </code><code style="color: #006699; font-weight: bold;">True</code> <code style="color: #006699; font-weight: bold;">Then</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 99px !important;"><code style="color: #000000;">MsgBox </code><code style="color: blue;">" No Record Found&nbsp; :&nbsp;&nbsp; "</code> <code style="color: #000000;">&amp; </code><code style="color: #006699; font-weight: bold;">Me</code><code style="color: #000000;">.NameText.Text</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 111px !important;"><code style="color: #000000;">NameText.Text = </code><code style="color: blue;">""</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 120px !important;"><code style="color: #006699; font-weight: bold;">Exit</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 96px !important;"><code style="color: #006699; font-weight: bold;">Else</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 48px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 18px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 48px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 48px !important;"><code style="color: #006699; font-weight: bold;">Do</code> <code style="color: #006699; font-weight: bold;">Until</code> <code style="color: #000000;">rsview.EOF = </code><code style="color: #006699; font-weight: bold;">True</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 48px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 60px !important;"><code style="color: #006699; font-weight: bold;">Set</code> <code style="color: #000000;">LI = ListView1.ListItems.Add(, , rsview(0))</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 60px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 60px !important;"><code style="color: #000000;">ListView1.ListItems.Add</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 60px !important;"><code style="color: #006699; font-weight: bold;">For</code> <code style="color: #000000;">x = 1 </code><code style="color: #006699; font-weight: bold;">To</code> <code style="color: #000000;">8</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 144px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 72px !important;"><code style="color: #000000;">LI.SubItems(x) = rsview(x)</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 72px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 60px !important;"><code style="color: #006699; font-weight: bold;">Next</code> <code style="color: #000000;">x</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 57px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 60px !important;"><code style="color: #000000;">rsview.MoveNext</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 48px !important;"><code style="color: #006699; font-weight: bold;">Loop</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 48px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 42px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">If</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 18px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">If</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #000000;">rsview.Close</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #000000;">con.Close</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Set</code> <code style="color: #000000;">rsview = </code><code style="color: #006699; font-weight: bold;">Nothing</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Set</code> <code style="color: #000000;">con = </code><code style="color: #006699; font-weight: bold;">Nothing</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Case</code> <code style="color: #000000;">2:</code></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">MsgBox </code><code style="color: blue;">" To be add later"</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Case</code> <code style="color: #000000;">3:</code></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 27px !important;"><code style="color: #000000;">MsgBox </code><code style="color: blue;">"To be add later"</code></span></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Case</code> <code style="color: #000000;">4:</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 21px !important;"><code style="color: #000000;">MsgBox </code><code style="color: blue;">"To be add later"</code></span></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Case</code> <code style="color: #000000;">5:</code></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 21px !important;"><code style="color: #000000;">MsgBox </code><code style="color: blue;">"To be add later"</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 21px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Case</code> <code style="color: #000000;">6:</code></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 21px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 21px !important;"><code style="color: #000000;">MsgBox </code><code style="color: blue;">"To be add later"</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 21px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Case</code> <code style="color: #000000;">7:</code></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #006699; font-weight: bold;">If</code> <code style="color: #000000;">ComboMyYear.Text = </code><code style="color: blue;">""</code> <code style="color: #006699; font-weight: bold;">Then</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 39px !important;"><code style="color: #000000;">MsgBox </code><code style="color: blue;">" Please Choose&nbsp; : "</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 39px !important;"><code style="color: #000000;">ComboMyYear.Refresh</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 51px !important;"><code style="color: #006699; font-weight: bold;">Exit</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 51px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 36px !important;"><code style="color: #006699; font-weight: bold;">Else</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 36px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 48px !important;"><code style="color: #000000;">rsview.Open </code><code style="color: blue;">"SELECT&nbsp; * FROM test where Year(DateofBirth) like '"</code> <code style="color: #000000;">&amp; ComboMyYear.Text &amp; </code><code style="color: blue;">"%'ORDER BY DateofBirth "</code><code style="color: #000000;">, con, adOpenStatic, adLockOptimistic</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 84px !important;"><code style="color: #006699; font-weight: bold;">If</code> <code style="color: #000000;">rsview.BOF = </code><code style="color: #006699; font-weight: bold;">True</code> <code style="color: #006699; font-weight: bold;">Or</code> <code style="color: #000000;">rsview.EOF = </code><code style="color: #006699; font-weight: bold;">True</code> <code style="color: #006699; font-weight: bold;">Then</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 99px !important;"><code style="color: #000000;">MsgBox </code><code style="color: blue;">" No Record Found&nbsp; :&nbsp;&nbsp; "</code> <code style="color: #000000;">&amp; </code><code style="color: #006699; font-weight: bold;">Me</code><code style="color: #000000;">.ComboMyYear.Text</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 111px !important;"><code style="color: #000000;">ComboMyYear.Clear</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 120px !important;"><code style="color: #006699; font-weight: bold;">Exit</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 96px !important;"><code style="color: #006699; font-weight: bold;">Else</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 48px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 18px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 48px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 48px !important;"><code style="color: #006699; font-weight: bold;">Do</code> <code style="color: #006699; font-weight: bold;">Until</code> <code style="color: #000000;">rsview.EOF = </code><code style="color: #006699; font-weight: bold;">True</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 48px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 60px !important;"><code style="color: #006699; font-weight: bold;">Set</code> <code style="color: #000000;">LI = ListView1.ListItems.Add(, , rsview(0))</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 72px !important;"><code style="color: #000000;">ListView1.Refresh</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 60px !important;"><code style="color: #006699; font-weight: bold;">For</code> <code style="color: #000000;">x = 1 </code><code style="color: #006699; font-weight: bold;">To</code> <code style="color: #000000;">8</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 144px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 72px !important;"><code style="color: #000000;">LI.SubItems(x) = rsview(x)</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 72px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 60px !important;"><code style="color: #006699; font-weight: bold;">Next</code> <code style="color: #000000;">x</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 60px !important;"><code style="color: #000000;">rsview.MoveNext</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 51px !important;"><code style="color: #006699; font-weight: bold;">Loop</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 48px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 42px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">If</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 6px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">If</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 6px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #000000;">rsview.Close</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #000000;">con.Close</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Set</code> <code style="color: #000000;">rsview = </code><code style="color: #006699; font-weight: bold;">Nothing</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Set</code> <code style="color: #000000;">con = </code><code style="color: #006699; font-weight: bold;">Nothing</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Case</code> <code style="color: #000000;">8:</code></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 93px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">rsview.Open </code><code style="color: blue;">"SELECT * FROM test "</code><code style="color: #000000;">, con, adOpenStatic, adLockOptimistic</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 27px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 27px !important;"><code style="color: #006699; font-weight: bold;">If</code> <code style="color: #000000;">rsview.BOF = </code><code style="color: #006699; font-weight: bold;">True</code> <code style="color: #006699; font-weight: bold;">Or</code> <code style="color: #000000;">rsview.EOF = </code><code style="color: #006699; font-weight: bold;">True</code> <code style="color: #006699; font-weight: bold;">Then</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 42px !important;"><code style="color: #000000;">MsgBox </code><code style="color: blue;">" Record Was Damage&nbsp; :&nbsp;&nbsp; "</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 48px !important;"><code style="color: #006699; font-weight: bold;">Exit</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 39px !important;"><code style="color: #006699; font-weight: bold;">Else</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 15px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 36px !important;"><code style="color: #006699; font-weight: bold;">Do</code> <code style="color: #006699; font-weight: bold;">Until</code> <code style="color: #000000;">rsview.EOF = </code><code style="color: #006699; font-weight: bold;">True</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 48px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 60px !important;"><code style="color: #006699; font-weight: bold;">Set</code> <code style="color: #000000;">LI = ListView1.ListItems.Add(, , rsview(0))</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 48px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 60px !important;"><code style="color: #006699; font-weight: bold;">For</code> <code style="color: #000000;">x = 1 </code><code style="color: #006699; font-weight: bold;">To</code> <code style="color: #000000;">8</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 144px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 72px !important;"><code style="color: #000000;">LI.SubItems(x) = rsview(x)</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 72px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 60px !important;"><code style="color: #006699; font-weight: bold;">Next</code> <code style="color: #000000;">x</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 57px !important;"><code style="color: #000000;">rsview.MoveNext</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 48px !important;"><code style="color: #006699; font-weight: bold;">Loop</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 48px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 42px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">If</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 18px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #000000;">rsview.Close</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #000000;">con.Close</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Set</code> <code style="color: #000000;">rsview = </code><code style="color: #006699; font-weight: bold;">Nothing</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Set</code> <code style="color: #000000;">con = </code><code style="color: #006699; font-weight: bold;">Nothing</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Case</code> <code style="color: #000000;">9:</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #006699; font-weight: bold;">If</code> <code style="color: #000000;">ComboFrom.Text = </code><code style="color: blue;">""</code> <code style="color: #006699; font-weight: bold;">Then</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 39px !important;"><code style="color: #000000;">MsgBox </code><code style="color: blue;">" Please Choose&nbsp; : "</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 39px !important;"><code style="color: #000000;">ComboFrom.Refresh</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 51px !important;"><code style="color: #006699; font-weight: bold;">Exit</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 51px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 36px !important;"><code style="color: #006699; font-weight: bold;">Else</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 36px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 48px !important;"><code style="color: #000000;">rsview.Open </code><code style="color: blue;">"SELECT * FROM test where Year(DateofBirth) like '"</code> <code style="color: #000000;">&amp; ComboFrom.Text &amp; </code><code style="color: blue;">"%'ORDER BY DateofBirth "</code><code style="color: #000000;">, con, adOpenStatic, adLockOptimistic</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 84px !important;"><code style="color: #006699; font-weight: bold;">If</code> <code style="color: #000000;">rsview.BOF = </code><code style="color: #006699; font-weight: bold;">True</code> <code style="color: #006699; font-weight: bold;">Or</code> <code style="color: #000000;">rsview.EOF = </code><code style="color: #006699; font-weight: bold;">True</code> <code style="color: #006699; font-weight: bold;">Then</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 99px !important;"><code style="color: #000000;">MsgBox </code><code style="color: blue;">" No Record Found&nbsp; :&nbsp;&nbsp; "</code> <code style="color: #000000;">&amp; </code><code style="color: #006699; font-weight: bold;">Me</code><code style="color: #000000;">.ComboFrom.Text</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 111px !important;"><code style="color: #000000;">ComboFrom.Clear</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 120px !important;"><code style="color: #006699; font-weight: bold;">Exit</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 96px !important;"><code style="color: #006699; font-weight: bold;">Else</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 48px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 18px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 48px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 48px !important;"><code style="color: #006699; font-weight: bold;">Do</code> <code style="color: #006699; font-weight: bold;">Until</code> <code style="color: #000000;">rsview.EOF = </code><code style="color: #006699; font-weight: bold;">True</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 48px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 60px !important;"><code style="color: #006699; font-weight: bold;">Set</code> <code style="color: #000000;">LI = ListView1.ListItems.Add(, , rsview(0))</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 72px !important;"><code style="color: #000000;">ListView1.Refresh</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 60px !important;"><code style="color: #006699; font-weight: bold;">For</code> <code style="color: #000000;">x = 1 </code><code style="color: #006699; font-weight: bold;">To</code> <code style="color: #000000;">8</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 144px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 72px !important;"><code style="color: #000000;">LI.SubItems(x) = rsview(x)</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 72px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 60px !important;"><code style="color: #006699; font-weight: bold;">Next</code> <code style="color: #000000;">x</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 60px !important;"><code style="color: #000000;">rsview.MoveNext</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 51px !important;"><code style="color: #006699; font-weight: bold;">Loop</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 48px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 42px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">If</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 6px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">If</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 6px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #000000;">rsview.Close</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #000000;">con.Close</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Set</code> <code style="color: #000000;">rsview = </code><code style="color: #006699; font-weight: bold;">Nothing</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Set</code> <code style="color: #000000;">con = </code><code style="color: #006699; font-weight: bold;">Nothing</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Case</code> <code style="color: #000000;">10:</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #006699; font-weight: bold;">If</code> <code style="color: #000000;">ComboUpto.Text = </code><code style="color: blue;">""</code> <code style="color: #006699; font-weight: bold;">Then</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 39px !important;"><code style="color: #000000;">MsgBox </code><code style="color: blue;">" Please Choose&nbsp; : "</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 39px !important;"><code style="color: #000000;">ComboUpto.Refresh</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 51px !important;"><code style="color: #006699; font-weight: bold;">Exit</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 51px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 36px !important;"><code style="color: #006699; font-weight: bold;">Else</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 36px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 48px !important;"><code style="color: #000000;">rsview.Open </code><code style="color: blue;">"SELECT * FROM test where Year(DateofBirth) like '"</code> <code style="color: #000000;">&amp; ComboUpto.Text &amp; </code><code style="color: blue;">"%'ORDER BY DateofBirth "</code><code style="color: #000000;">, con, adOpenStatic, adLockOptimistic</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 84px !important;"><code style="color: #006699; font-weight: bold;">If</code> <code style="color: #000000;">rsview.BOF = </code><code style="color: #006699; font-weight: bold;">True</code> <code style="color: #006699; font-weight: bold;">Or</code> <code style="color: #000000;">rsview.EOF = </code><code style="color: #006699; font-weight: bold;">True</code> <code style="color: #006699; font-weight: bold;">Then</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 99px !important;"><code style="color: #000000;">MsgBox </code><code style="color: blue;">" No Record Found&nbsp; :&nbsp;&nbsp; "</code> <code style="color: #000000;">&amp; </code><code style="color: #006699; font-weight: bold;">Me</code><code style="color: #000000;">.ComboUpto.Text</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 111px !important;"><code style="color: #000000;">ComboUpto.Clear</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 120px !important;"><code style="color: #006699; font-weight: bold;">Exit</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 96px !important;"><code style="color: #006699; font-weight: bold;">Else</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 48px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 18px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 48px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 48px !important;"><code style="color: #006699; font-weight: bold;">Do</code> <code style="color: #006699; font-weight: bold;">Until</code> <code style="color: #000000;">rsview.EOF = </code><code style="color: #006699; font-weight: bold;">True</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 48px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 60px !important;"><code style="color: #006699; font-weight: bold;">Set</code> <code style="color: #000000;">LI = ListView1.ListItems.Add(, , rsview(0))</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 72px !important;"><code style="color: #000000;">ListView1.Refresh</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 60px !important;"><code style="color: #006699; font-weight: bold;">For</code> <code style="color: #000000;">x = 1 </code><code style="color: #006699; font-weight: bold;">To</code> <code style="color: #000000;">8</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 144px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 72px !important;"><code style="color: #000000;">LI.SubItems(x) = rsview(x)</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 72px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 60px !important;"><code style="color: #006699; font-weight: bold;">Next</code> <code style="color: #000000;">x</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 60px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 60px !important;"><code style="color: #000000;">rsview.MoveNext</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 51px !important;"><code style="color: #006699; font-weight: bold;">Loop</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 48px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 42px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">If</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 6px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">If</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 6px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #000000;">rsview.Close</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #000000;">con.Close</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Set</code> <code style="color: #000000;">rsview = </code><code style="color: #006699; font-weight: bold;">Nothing</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Set</code> <code style="color: #000000;">con = </code><code style="color: #006699; font-weight: bold;">Nothing</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Case</code> <code style="color: #000000;">11:</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #006699; font-weight: bold;">If</code> <code style="color: #000000;">YearFromCheck.Value = 1 &amp; YearUptoCheck.Value = 1 </code><code style="color: #006699; font-weight: bold;">Then</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 33px !important;"><code style="color: #000000;">ComboFrom.Enabled = </code><code style="color: #006699; font-weight: bold;">True</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 33px !important;"><code style="color: #000000;">ComboUpto.Enabled = </code><code style="color: #006699; font-weight: bold;">True</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 33px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 27px !important;"><code style="color: #000000;">rsview.Open </code><code style="color: blue;">"SELECT DateofBirth FROM test where DateofBirth BETWEEN '"</code> <code style="color: #000000;">&amp; ComboFrom.Text &amp; </code><code style="color: blue;">"' AND '"</code> <code style="color: #000000;">&amp; ComboUpto.Text &amp; </code><code style="color: blue;">"'"</code><code style="color: #000000;">, con, adOpenStatic, adLockOptimistic</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #008200;">'rsview.Open "Select DateofBirth FROM test where DateofBirth &gt;= '" &amp; Format(" # ", "mm/dd/yyyy") &amp; "' and DateofBirth &lt;= '" &amp; Format(" # ", "mm/dd/yyyy") &amp; "'"</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 27px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 84px !important;"><code style="color: #006699; font-weight: bold;">If</code> <code style="color: #000000;">rsview.BOF = </code><code style="color: #006699; font-weight: bold;">True</code> <code style="color: #006699; font-weight: bold;">Or</code> <code style="color: #000000;">rsview.EOF = </code><code style="color: #006699; font-weight: bold;">True</code> <code style="color: #006699; font-weight: bold;">Then</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 99px !important;"><code style="color: #000000;">MsgBox </code><code style="color: blue;">" No Record Found&nbsp; :&nbsp;&nbsp; "</code> <code style="color: #000000;">&amp; </code><code style="color: #006699; font-weight: bold;">Me</code><code style="color: #000000;">.ComboFrom.Text, </code><code style="color: #006699; font-weight: bold;">Me</code><code style="color: #000000;">.ComboUpto.Text</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 111px !important;"><code style="color: #000000;">ComboFrom.Clear</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 111px !important;"><code style="color: #000000;">ComboUpto.Clear</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 120px !important;"><code style="color: #006699; font-weight: bold;">Exit</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 96px !important;"><code style="color: #006699; font-weight: bold;">Else</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 48px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 18px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 48px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 48px !important;"><code style="color: #006699; font-weight: bold;">Do</code> <code style="color: #006699; font-weight: bold;">Until</code> <code style="color: #000000;">rsview.EOF = </code><code style="color: #006699; font-weight: bold;">True</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 48px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 60px !important;"><code style="color: #006699; font-weight: bold;">Set</code> <code style="color: #000000;">LI = ListView1.ListItems.Add(, , rsview(0))</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 72px !important;"><code style="color: #000000;">ListView1.Refresh</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 60px !important;"><code style="color: #006699; font-weight: bold;">For</code> <code style="color: #000000;">x = 1 </code><code style="color: #006699; font-weight: bold;">To</code> <code style="color: #000000;">8</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 144px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 72px !important;"><code style="color: #000000;">LI.SubItems(x) = rsview(x)</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 72px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 60px !important;"><code style="color: #006699; font-weight: bold;">Next</code> <code style="color: #000000;">x</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 60px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 60px !important;"><code style="color: #000000;">rsview.MoveNext</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 51px !important;"><code style="color: #006699; font-weight: bold;">Loop</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 51px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 48px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">If</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 42px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">If</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 42px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">rsview.Close</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">con.Close</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #006699; font-weight: bold;">Set</code> <code style="color: #000000;">rsview = </code><code style="color: #006699; font-weight: bold;">Nothing</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #006699; font-weight: bold;">Set</code> <code style="color: #000000;">con = </code><code style="color: #006699; font-weight: bold;">Nothing</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">Select</code></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 57px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Private</code> <code style="color: #006699; font-weight: bold;">Sub</code> <code style="color: #000000;">cmdClear_Click()</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #008200;">'-------------------------------------DEACTIVATE TEXTBOX -------------------------</code></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">NameText.Enabled = </code><code style="color: #006699; font-weight: bold;">False</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">SurnameText.Enabled = </code><code style="color: #006699; font-weight: bold;">False</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">AddressText.Enabled = </code><code style="color: #006699; font-weight: bold;">False</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">DistrictText.Enabled = </code><code style="color: #006699; font-weight: bold;">False</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">StateText.Enabled = </code><code style="color: #006699; font-weight: bold;">False</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">OccupationText.Enabled = </code><code style="color: #006699; font-weight: bold;">False</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">ComboMyYear.Enabled = </code><code style="color: #006699; font-weight: bold;">False</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">RegistrationText.Enabled = </code><code style="color: #006699; font-weight: bold;">False</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #008200;">'--------------------------------------- CLEAR TEXTBOX ---------------------------</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">NameText.Text = </code><code style="color: blue;">""</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">SurnameText.Text = </code><code style="color: blue;">""</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">AddressText.Text = </code><code style="color: blue;">""</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">DistrictText.Text = </code><code style="color: blue;">""</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">StateText.Text = </code><code style="color: blue;">""</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">OccupationText.Text = </code><code style="color: blue;">""</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">ComboMyYear.Clear</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">RegistrationText.Text = </code><code style="color: blue;">""</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">ComboFrom.Clear</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">ComboUpto.Clear</code></span></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #008200;">'--------------------------------------CLEAR CHECKBOX ------------------------------</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">NameCheck.Value = 0</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">SurnameCheck.Value = 0</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">AddressCheck.Value = 0</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">DistrictCheck.Value = 0</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">StateCheck.Value = 0</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">OccupationCheck.Value = 0</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">YearCheck.Value = 0</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">RegistrationCheck.Value = 0</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">AllRecordCheck.Value = 0</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">YearFromCheck.Value = 0</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">YearUptoCheck.Value = 0</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #008200;">'------------------------------------ CLEAR LISTVIEW ------------------------------</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">ListView1.ListItems.Clear</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 21px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #008200;">'------------------------------------CHECKBOX ACTIVATE AND DEACTIVATE -----------------------------------</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Private</code> <code style="color: #006699; font-weight: bold;">Sub</code> <code style="color: #000000;">NameCheck_Click()</code></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;</code><span style="margin-left: 3px !important;"><code style="color: #006699; font-weight: bold;">If</code> <code style="color: #000000;">NameCheck.Value = 1 </code><code style="color: #006699; font-weight: bold;">Then</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">NameText.Enabled = </code><code style="color: #006699; font-weight: bold;">True</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #000000;">NameText.BackColor = vbWhite</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #006699; font-weight: bold;">Exit</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #006699; font-weight: bold;">Else</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 15px !important;"><code style="color: #006699; font-weight: bold;">If</code> <code style="color: #000000;">NameCheck.Value = 0 </code><code style="color: #006699; font-weight: bold;">Then</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">NameText.Enabled = </code><code style="color: #006699; font-weight: bold;">False</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">NameText.BackColor = &amp;H80000000</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #006699; font-weight: bold;">Exit</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;</code><span style="margin-left: 3px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">If</code></span></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">If</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Private</code> <code style="color: #006699; font-weight: bold;">Sub</code> <code style="color: #000000;">SurnameCheck_Click()</code></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;</code><span style="margin-left: 3px !important;"><code style="color: #006699; font-weight: bold;">If</code> <code style="color: #000000;">SurnameCheck.Value = 1 </code><code style="color: #006699; font-weight: bold;">Then</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">SurnameText.Enabled = </code><code style="color: #006699; font-weight: bold;">True</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">SurnameText.BackColor = vbWhite</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #006699; font-weight: bold;">Exit</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #006699; font-weight: bold;">Else</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 18px !important;"><code style="color: #006699; font-weight: bold;">If</code> <code style="color: #000000;">SurnameCheck.Value = 0 </code><code style="color: #006699; font-weight: bold;">Then</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">SurnameText.Enabled = </code><code style="color: #006699; font-weight: bold;">True</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">SurnameText.BackColor = &amp;H80000000</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #006699; font-weight: bold;">Exit</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">If</code></span></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">If</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Private</code> <code style="color: #006699; font-weight: bold;">Sub</code> <code style="color: #000000;">AddressCheck_Click()</code></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #006699; font-weight: bold;">If</code> <code style="color: #000000;">AddressCheck.Value = 1 </code><code style="color: #006699; font-weight: bold;">Then</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">AddressText.Enabled = </code><code style="color: #006699; font-weight: bold;">True</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">AddressText.BackColor = vbWhite</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #006699; font-weight: bold;">Exit</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #006699; font-weight: bold;">Else</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 18px !important;"><code style="color: #006699; font-weight: bold;">If</code> <code style="color: #000000;">AddressCheck.Value = 0 </code><code style="color: #006699; font-weight: bold;">Then</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">AddressText.Enabled = </code><code style="color: #006699; font-weight: bold;">True</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">AddressText.BackColor = &amp;H80000000</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #006699; font-weight: bold;">Exit</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">If</code></span></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">If</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Private</code> <code style="color: #006699; font-weight: bold;">Sub</code> <code style="color: #000000;">DistrictCheck_Click()</code></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 15px !important;"><code style="color: #006699; font-weight: bold;">If</code> <code style="color: #000000;">DistrictCheck.Value = 1 </code><code style="color: #006699; font-weight: bold;">Then</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">DistrictText.Enabled = </code><code style="color: #006699; font-weight: bold;">True</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">DistrictText.BackColor = vbWhite</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #006699; font-weight: bold;">Exit</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #006699; font-weight: bold;">Else</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 18px !important;"><code style="color: #006699; font-weight: bold;">If</code> <code style="color: #000000;">DistrictCheck.Value = 0 </code><code style="color: #006699; font-weight: bold;">Then</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">DistrictText.Enabled = </code><code style="color: #006699; font-weight: bold;">True</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">DistrictText.BackColor = &amp;H80000000</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #006699; font-weight: bold;">Exit</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">If</code></span></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">If</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Private</code> <code style="color: #006699; font-weight: bold;">Sub</code> <code style="color: #000000;">StateCheck_Click()</code></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #006699; font-weight: bold;">If</code> <code style="color: #000000;">StateCheck.Value = 1 </code><code style="color: #006699; font-weight: bold;">Then</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">StateText.Enabled = </code><code style="color: #006699; font-weight: bold;">True</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">StateText.BackColor = vbWhite</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #006699; font-weight: bold;">Exit</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #006699; font-weight: bold;">Else</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 18px !important;"><code style="color: #006699; font-weight: bold;">If</code> <code style="color: #000000;">StateCheck.Value = 0 </code><code style="color: #006699; font-weight: bold;">Then</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">StateText.Enabled = </code><code style="color: #006699; font-weight: bold;">True</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">StateText.BackColor = &amp;H80000000</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #006699; font-weight: bold;">Exit</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">If</code></span></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">If</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Private</code> <code style="color: #006699; font-weight: bold;">Sub</code> <code style="color: #000000;">OccupationCheck_Click()</code></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #006699; font-weight: bold;">If</code> <code style="color: #000000;">OccupationCheck.Value = 1 </code><code style="color: #006699; font-weight: bold;">Then</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">OccupationText.Enabled = </code><code style="color: #006699; font-weight: bold;">True</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">OccupationText.BackColor = vbWhite</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #006699; font-weight: bold;">Exit</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #006699; font-weight: bold;">Else</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 18px !important;"><code style="color: #006699; font-weight: bold;">If</code> <code style="color: #000000;">OccupationCheck.Value = 0 </code><code style="color: #006699; font-weight: bold;">Then</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">OccupationText.Enabled = </code><code style="color: #006699; font-weight: bold;">True</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">OccupationText.BackColor = &amp;H80000000</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #006699; font-weight: bold;">Exit</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">If</code></span></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">If</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Private</code> <code style="color: #006699; font-weight: bold;">Sub</code> <code style="color: #000000;">YearCheck_Click()</code></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 18px !important;"><code style="color: #006699; font-weight: bold;">If</code> <code style="color: #000000;">YearCheck.Value = 1 </code><code style="color: #006699; font-weight: bold;">Then</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">ComboMyYear.Enabled = </code><code style="color: #006699; font-weight: bold;">True</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">ComboMyYear.BackColor = vbWhite</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">populatecombo</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #006699; font-weight: bold;">Exit</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #006699; font-weight: bold;">Else</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 18px !important;"><code style="color: #006699; font-weight: bold;">If</code> <code style="color: #000000;">YearCheck.Value = 0 </code><code style="color: #006699; font-weight: bold;">Then</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">ComboMyYear.Enabled = </code><code style="color: #006699; font-weight: bold;">True</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">ComboMyYear.BackColor = &amp;H80000000</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">ComboMyYear.Clear</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #006699; font-weight: bold;">Exit</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">If</code></span></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">If</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Private</code> <code style="color: #006699; font-weight: bold;">Sub</code> <code style="color: #000000;">RegistrationCheck_Click()</code></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #006699; font-weight: bold;">If</code> <code style="color: #000000;">RegistrationCheck.Value = 1 </code><code style="color: #006699; font-weight: bold;">Then</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">RegistrationText.Enabled = </code><code style="color: #006699; font-weight: bold;">True</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">RegistrationText.BackColor = vbWhite</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #006699; font-weight: bold;">Exit</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #006699; font-weight: bold;">Else</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 18px !important;"><code style="color: #006699; font-weight: bold;">If</code> <code style="color: #000000;">RegistrationCheck.Value = 0 </code><code style="color: #006699; font-weight: bold;">Then</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">RegistrationText.Enabled = </code><code style="color: #006699; font-weight: bold;">True</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">RegistrationText.BackColor = &amp;H80000000</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #006699; font-weight: bold;">Exit</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 9px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">If</code></span></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">If</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Private</code> <code style="color: #006699; font-weight: bold;">Sub</code> <code style="color: #000000;">YearFromCheck_Click()</code></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #006699; font-weight: bold;">If</code> <code style="color: #000000;">YearFromCheck.Value = 1 </code><code style="color: #006699; font-weight: bold;">Then</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">ComboFrom.Enabled = </code><code style="color: #006699; font-weight: bold;">True</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">ComboFrom.BackColor = vbWhite</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">populatecomboFrom</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #006699; font-weight: bold;">Exit</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #006699; font-weight: bold;">Else</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 18px !important;"><code style="color: #006699; font-weight: bold;">If</code> <code style="color: #000000;">YearFromCheck.Value = 0 </code><code style="color: #006699; font-weight: bold;">Then</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">ComboFrom.Enabled = </code><code style="color: #006699; font-weight: bold;">True</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">ComboFrom.BackColor = &amp;H80000000</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">ComboFrom.Clear</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #006699; font-weight: bold;">Exit</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 9px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">If</code></span></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">If</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Private</code> <code style="color: #006699; font-weight: bold;">Sub</code> <code style="color: #000000;">YearUptoCheck_Click()</code></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #006699; font-weight: bold;">If</code> <code style="color: #000000;">YearUptoCheck.Value = 1 </code><code style="color: #006699; font-weight: bold;">Then</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">ComboUpto.Enabled = </code><code style="color: #006699; font-weight: bold;">True</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">ComboUpto.BackColor = vbWhite</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">populatecomboUpto</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #006699; font-weight: bold;">Exit</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;"><code style="color: #006699; font-weight: bold;">Else</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 18px !important;"><code style="color: #006699; font-weight: bold;">If</code> <code style="color: #000000;">YearUptoCheck.Value = 0 </code><code style="color: #006699; font-weight: bold;">Then</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">ComboUpto.Enabled = </code><code style="color: #006699; font-weight: bold;">True</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">ComboUpto.BackColor = &amp;H80000000</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #000000;">ComboUpto.Clear</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;"><code style="color: #006699; font-weight: bold;">Exit</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 4px !important;">&nbsp;</span></span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 9px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">If</code></span></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">If</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></div>
</div>&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10472459/how-to-filter-year-in-two-combo-box-and-display-in-listview.aspx" target="_self">read more</a>]]></description><pubDate>Tue, 26 Feb 2013 01:03:54 GMT</pubDate></item><item><title><![CDATA[Save drafts in gmail account through VB Script]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10470441/save-drafts-in-gmail-account-through-vb-script.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10470441/save-drafts-in-gmail-account-through-vb-script.aspx]]></link><description><![CDATA[Hi ,<br />
<br />
Please provide code to implement &nbsp;Save email in Drafts folder in gmail account through VB Script.<br />
<br />
thanks<br />
Bala&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10470441/save-drafts-in-gmail-account-through-vb-script.aspx" target="_self">read more</a>]]></description><pubDate>Thu, 28 Mar 2013 23:01:15 GMT</pubDate></item><item><title><![CDATA[Conditional formatting by Macro]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10469908/conditional-formatting-by-macro.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10469908/conditional-formatting-by-macro.aspx]]></link><description><![CDATA[How to apply conditional formatting by macro based on the following criteria.<br />
Apply on range E5:E5000<br />
=AND($M5=1,$D5&gt;=$N$1-30) IF TRUE cell color green<br />
=AND($M5=1,$D5&lt;$N$1-30,$D5&gt;$N$1-60) IF TRUE cell color orange<br />
=AND($M5=1,$D5&lt;$N$1-60) IF TRUE cell color yellow.<br />
Also the macro to be able undo conditional formatting. <br />
<br />
Thanks.<br />
Gauss.&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10469908/conditional-formatting-by-macro.aspx" target="_self">read more</a>]]></description><pubDate>Thu, 28 Mar 2013 23:01:17 GMT</pubDate></item><item><title><![CDATA[i want to know how to pass twoor more  parmeters of different data typefrom vb to data rep]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10464609/i-want-to-know-how-to-pass-twoor-more--parmeters-of-different-data-typefrom-vb-to-data-rep.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10464609/i-want-to-know-how-to-pass-twoor-more--parmeters-of-different-data-typefrom-vb-to-data-rep.aspx]]></link><description><![CDATA[&nbsp;i want to know how to pass two or more&nbsp; parameters of a database of different data types from vb to data report<br />
and also i have to know how to dynamically set&nbsp; the database to dataenviornment through properties.&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10464609/i-want-to-know-how-to-pass-twoor-more--parmeters-of-different-data-typefrom-vb-to-data-rep.aspx" target="_self">read more</a>]]></description><pubDate>Thu, 28 Mar 2013 23:02:38 GMT</pubDate></item><item><title><![CDATA[FIFO table]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10308483/fifo-table.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10308483/fifo-table.aspx]]></link><description><![CDATA[<p>I have a ms access table&nbsp;it's record as bellow.</p>
<p>sl#&nbsp;&nbsp;Itemid&nbsp;&nbsp;stock&nbsp;&nbsp;price</p>
<p>1&nbsp;&nbsp;4062&nbsp;&nbsp;30&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1</p>
<p>2&nbsp;&nbsp;4062&nbsp;&nbsp;40&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1.5</p>
<p>3&nbsp;&nbsp;4062&nbsp;&nbsp;40&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2</p>
<p>I want to deduct the stock when I sale the item.In this table you can see that the value of the stock is different.example</p>
<p>If I enter the sale quantity 35 then it should deduct the stock as 30*1 and balance 5*1.5 by using this table I want to make fifo stocking program so please give me the looping code though this table. I tried but fail any help would be appreciated.</p>
<p>&nbsp;&nbsp;&nbsp;</p>&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10308483/fifo-table.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:00:34 GMT</pubDate></item><item><title><![CDATA[Namespace]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10281564/namespace.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10281564/namespace.aspx]]></link><description><![CDATA[<div><strong>&nbsp;&nbsp; &nbsp; &nbsp;Dim Normfldr As Object</strong></div>
<div><strong>&nbsp;&nbsp; &nbsp; &nbsp;Dim zipfldr As Object</strong></div>
<div><strong>&nbsp;&nbsp; &nbsp; &nbsp;Set zipfldr = CreateObject("Shell.Application")</strong></div>
<div><strong>&nbsp;&nbsp; &nbsp; &nbsp;Set Normfldr = CreateObject("Shell.Application")</strong></div>
<div><strong>&nbsp;&nbsp; &nbsp; &nbsp;Normfldr.NameSpace("C:\Testunzip").copyhere zipfldr.NameSpace("c:\testzip.zip").Items, FOF_NOCONFIRMATION</strong></div>
<div><br />
</div>
<div>I get a "File exists" error on this. What is weird is the code used to work fine, then out of the blue it stopped working. The only thing that was different was I removed a USB memory stick. I tried rebooting after that thinking the memory stick had in some way temporarily changed some system settings. Still the same thing,&nbsp;"File exists" error no matter what paths I use..</div>
<div>I have tried without&nbsp;<strong>FOF_NOCONFIRMATION, </strong>tried with it...Any ideas?</div>
<div><br />
</div>
<div>Windows XP 32 bit SP3...</div>
<div>Same thing in vb6 and VBSCRIPT...</div>
<div>What settings could affect this code?</div>
<div>Thanks</div>
<div><br />
</div>
<div>Just an update..</div>
<div>I found the problem..When unzipping windows creates a folder under the temp directory called</div>
<div>"Temporary Directory (<em>whatever number</em>) for&nbsp;<strong>testzip.zip</strong>." Once the&nbsp;<em><strong>whatever</strong> number </em>reaches 99 the "<strong>File exists error</strong>" happens and your program fails. Windows once again does not do its clean up and of course doesn't tell you that you have to, nor is there any way for you to know that its even creating a temporary file...Where do they get this code written? <strong>Ridiculous, that cost me hours!</strong></div>&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10281564/namespace.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:00:35 GMT</pubDate></item><item><title><![CDATA[SendMessage API VBA]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10280850/sendmessage-api-vba.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10280850/sendmessage-api-vba.aspx]]></link><description><![CDATA[I am using VBA. I am downloading files from the Internet and the typical Save As Dialog Box appears. I was able to find the Save As hWnd and&nbsp;from it the&nbsp;Edit hWnd child. I then use the SendMessage API with the appropriate arguments to place the path and filename into the Edit field. I can see the full path and filename. I use the hWnd for the Save to click it. <br />
<br />
My problem is that the Save As Dialog Box is not recognizing the full path and filename in the Edit field. I can see it but it is not processing it. It seems that it places the info visually but is stuck in a queue. I know I could use the SendKeys method but that is highly unstable and I would like to avid that. <br />
<br />
Does anyone know what is going on and how I could solve this? It would help me tremendously.<br />
<br />&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10280850/sendmessage-api-vba.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:00:35 GMT</pubDate></item><item><title><![CDATA[Tab delimeter in ADO getString() Method]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10279210/tab-delimeter-in-ado-getstring-method.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10279210/tab-delimeter-in-ado-getstring-method.aspx]]></link><description><![CDATA[<p>I am using the below code to print the recordset in a text box&nbsp; in report<br />
<br />
TextData.Value = rs.GetString(2, -1, vbTab, vbNewLine, "&amp;nbsp;")<br />
<br />
and the result is<br />
<br />
12/10/2002 7:39:55 AM&nbsp;First name Last name</p>
<p>12/10/2002 7:41:08 AM&nbsp;first name&nbsp;last name<br />
01/10/2003 12:54:38 PM&nbsp;First name&nbsp;Lastname<br />
<br />
I want every column in the recordset to be nicely formatted with a tab, vbNewLine works for me but vbTab isn't working<br />
<br />
any help would be greatly appreciated.<br />
Thanks</p>&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10279210/tab-delimeter-in-ado-getstring-method.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:00:35 GMT</pubDate></item><item><title><![CDATA[how to program and play video file with extension .flv in vb6.0 form]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10275867/how-to-program-and-play-video-file-with-extension-flv-in-vb60-form.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10275867/how-to-program-and-play-video-file-with-extension-flv-in-vb60-form.aspx]]></link><description><![CDATA[pls, can you show me how to play video file with the extension .flv in vb6.0 form programmatically.&nbsp; thanks&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10275867/how-to-program-and-play-video-file-with-extension-flv-in-vb60-form.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:00:36 GMT</pubDate></item><item><title><![CDATA[developing simple software using front end and back end]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10274579/developing-simple-software-using-front-end-and-back-end.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10274579/developing-simple-software-using-front-end-and-back-end.aspx]]></link><description><![CDATA[hello sir, <br />
i want to develop simple technique using front end and back end and using excel sheet to calculate&nbsp; the travelling allowance for government employees&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10274579/developing-simple-software-using-front-end-and-back-end.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:00:36 GMT</pubDate></item><item><title><![CDATA[checkbox to be autoselected when value is entered in editbox using MFC]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10274490/checkbox-to-be-autoselected-when-value-is-entered-in-editbox-using-mfc.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10274490/checkbox-to-be-autoselected-when-value-is-entered-in-editbox-using-mfc.aspx]]></link><description><![CDATA[<p><strong>Hi,</strong></p>
<p>&nbsp;im doing a prog in which , when “Load”&nbsp; entered in text box the check box has to be selected automatically ... how to do it ,,, please help me</p>
<p><strong>this is my code</strong></p>
<p>if (pWnd-&amp;gt;GetDlgCtrlID(&amp;quot;Load&amp;quot;) == IDC_EDIT1)<br />
&nbsp;&nbsp;&nbsp; {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Set the text color to red<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pDC-&amp;gt;SetTextColor(RGB(255, 0, 0));</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Set the background mode for text to transparent<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // so background will show thru.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pDC-&amp;gt;SetBkMode(TRANSPARENT);</p>
<p>&nbsp;&nbsp;&nbsp; // Return handle to our CBrush object<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hbr = m_brush;<br />
&nbsp;&nbsp; }</p>
<p>&nbsp;</p>
<p >&nbsp;&nbsp;&nbsp;&nbsp; if (pWnd-&amp;gt;GetDlgCtrlID() == IDC_CHECK1)<br />
&nbsp;&nbsp;&nbsp;&nbsp; {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Set the text color to red<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pDC-&amp;gt;SetTextColor(RGB(255, 0, 0));</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Set the background mode for text to transparent<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // so background will show thru.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pDC-&amp;gt;SetBkMode(TRANSPARENT);</p>
<p >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DWORD dwStyle = pWnd-&amp;gt;GetStyle(&amp;quot;Load&amp;quot;);</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; if ( dwStyle &amp;amp;(BS_AUTOCHECKBOX |BS_CHECKBOX) )</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Return handle to our CBrush object<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hbr = m_brush;<br />
&nbsp;&nbsp;&nbsp;&nbsp; }<br />
<strong>thanks in advance</strong></p>&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10274490/checkbox-to-be-autoselected-when-value-is-entered-in-editbox-using-mfc.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:00:36 GMT</pubDate></item><item><title><![CDATA[Need to automatically execute SQL query using VB]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10266322/need-to-automatically-execute-sql-query-using-vb.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10266322/need-to-automatically-execute-sql-query-using-vb.aspx]]></link><description><![CDATA[Hi,<br />
I have a dought how to automatically execute SQL query using VB.What I want to do is <br />
1.X number of SQL queries are there in excel sheet<br />
<br />
2.On some event my database automatically gets connected and takes the first query to execute.<br />
<br />
3.The result returned by this query gets stored in another excel sheet.Once the result of first query is stored in a file database automaticaly takes the second query from first excel sheet.<br />
<br />
4.The 3rd step keeps on repeating until all the queries stored int ecel sheet gets executed.&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10266322/need-to-automatically-execute-sql-query-using-vb.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:00:40 GMT</pubDate></item><item><title><![CDATA[show image]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10266251/show-image.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10266251/show-image.aspx]]></link><description><![CDATA[Hi to all,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I have a image in a folder loacated in C drive. I want to display that image in a image control with VBScript. i wrote the code like <font size="2">
<p>document.all(<font color="#a31515" size="2"><font color="#a31515" size="2">"ctl00_ContentPlaceHolder1_AshaImage"</font></font><font size="2">).src=PPhoto </font></p>
</font>where PPhoto has that path. <br />
but its not working. any body give an idea how to display an image with vbscript<br />
Thanks in advance&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10266251/show-image.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:00:40 GMT</pubDate></item><item><title><![CDATA[data report]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10266141/data-report.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10266141/data-report.aspx]]></link><description><![CDATA[hi i am making a project on vb6 and i am using data report . i first created data environment and then linked it with data report. once using this process i got the required result but next time when i am trying to do it a am getting an error "invalid data source". i have checked the connection properly. one thing i noted was that when i am on he design page before running the project &amp; i refresh the connection it gives "database connected". but after running the project it automatically changes to "database not connected". Moreover the report for which i got the result once is still giving the correct result. i am not able to understand the exact problem. please anyone give me a proper solution.&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10266141/data-report.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:00:40 GMT</pubDate></item><item><title><![CDATA[VBS script to validate the local user credentials]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10262890/vbs-script-to-validate-the-local-user-credentials.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10262890/vbs-script-to-validate-the-local-user-credentials.aspx]]></link><description><![CDATA[Hi,<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp; I need to check the entered local user name and Password are valid in a local computer. Please&nbsp;help me to resolve.<br />
<br />
Thanks,<br />
Vels<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10262890/vbs-script-to-validate-the-local-user-credentials.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:00:50 GMT</pubDate></item><item><title><![CDATA[Divide a dynamic connector into 2 parts and add text]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10262745/divide-a-dynamic-connector-into-2-parts-and-add-text.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10262745/divide-a-dynamic-connector-into-2-parts-and-add-text.aspx]]></link><description><![CDATA[Hi,<br />
<br />
I am programming in Visual Basic 6.5 to do some specialized things in Visio.<br />
<br />
After much frustration, I now paste this problem to you guys:<br />
<br />
-There are two rectangles with custom properties. <br />
-There is a dynamic connector connecting these two rectangles.<br />
-Now I run a macro on this connector to receive the information about the two rectangles. (very useful for creating cable lists).<br />
<br />
Here's the problem:<br />
Often, I cannot have this line running across my drawing because it is messy and just undesirable. So, I split this line going from rectangle 1 to 2, into two lines. Where the first line connects to rectangle 1 only, and the second line connects to rectangle 2 only.<br />
Finally, the line connected to rectangle 1 should have its text say the description of rectangle 2, and vice versa. This is so that the reader knows where these split up&nbsp;connectors are going, while keeping everything neat.<br />
<br />
This "split up" and typing I want to automate, and is driving me crazy.<br />
<br />
Any recommendations to do this easily would be apprecaited. Any new or pre-existing code would be great.<br />
Even some guidelines to go about this problem would be excellent.<br />
<br />
Thanks and Cheers,<br />
Hamzah<br />&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10262745/divide-a-dynamic-connector-into-2-parts-and-add-text.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:00:50 GMT</pubDate></item><item><title><![CDATA[I want to speed up my macro]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10262309/i-want-to-speed-up-my-macro.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10262309/i-want-to-speed-up-my-macro.aspx]]></link><description><![CDATA[Good afternoon,<br />
<br />
I wrote a macro to list all files in a directory but its takes over 10 minutes to run. It does do a search over the network and then it pulls those files. I was wondering is there any way that I could speed this up.<br />
<br />
<p>Sub macro1()<br />
&nbsp;<br />
&nbsp; ListFilesInFolder "<a href="file://\\corp\networkshare\shareFiles">\\corp\networkshare\shareFiles</a>", True</p>
<p>End Sub</p>
<p >Sub ListFilesInFolder(SourceFolderName As String, IncludeSubfolders As Boolean)<br />
' files in SourceFolder'<br />
' example: ListFilesInFolder "C:\FolderName\", True<br />
Dim FSO As Scripting.FileSystemObject<br />
Dim SourceFolder As Scripting.Folder, SubFolder As Scripting.Folder<br />
Dim FileItem As Scripting.File<br />
Dim r As Long<br />
&nbsp;&nbsp;&nbsp; Set FSO = New Scripting.FileSystemObject<br />
&nbsp;&nbsp;&nbsp; Set SourceFolder = FSO.GetFolder(SourceFolderName)<br />
&nbsp;&nbsp;&nbsp; r = Range("A65536").End(xlUp).Row + 1<br />
&nbsp;&nbsp;&nbsp; For Each FileItem In SourceFolder.Files<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' display file properties<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Cells(r, 1).Formula = FileItem.Name<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Cells(r, 2).Formula = FileItem.Path<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Cells(r, 3).Formula = FileItem.DateCreated<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Cells(r, 4).Formula = FileItem.DateLastModified<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Cells(r, 5).Formula = GetFileOwner(SourceFolder.Path, FileItem.Name)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; r = r + 1 ' next row<br />
&nbsp;&nbsp;&nbsp; Next FileItem<br />
&nbsp;&nbsp;&nbsp; If IncludeSubfolders Then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; For Each SubFolder In SourceFolder.SubFolders<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ListFilesInFolder SubFolder.Path, True<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Next SubFolder<br />
&nbsp;&nbsp;&nbsp; End If<br />
&nbsp;&nbsp;&nbsp; Columns("A:G").ColumnWidth = 4<br />
&nbsp;&nbsp;&nbsp; Columns("H:I").AutoFit<br />
&nbsp;&nbsp;&nbsp; Columns("J:L").ColumnWidth = 12<br />
&nbsp;&nbsp;&nbsp; Columns("M:P").ColumnWidth = 8<br />
&nbsp;&nbsp;&nbsp; Set FileItem = Nothing<br />
&nbsp;&nbsp;&nbsp; Set SourceFolder = Nothing<br />
&nbsp;&nbsp;&nbsp; Set FSO = Nothing<br />
&nbsp;&nbsp;&nbsp; ActiveWorkbook.Saved = True<br />
End Sub</p>
<p>Function GetFileOwner(ByVal FilePath As String, ByVal FileName As String)</p>
<p>&nbsp; Dim objFolder As Object<br />
&nbsp; Dim objFolderItem As Object<br />
&nbsp; Dim objShell As Object</p>
<p>&nbsp;&nbsp;&nbsp; FileName = StrConv(FileName, vbUnicode)<br />
&nbsp;&nbsp;&nbsp; FilePath = StrConv(FilePath, vbUnicode)</p>
<p>&nbsp;&nbsp; Set objShell = CreateObject("Shell.Application")<br />
&nbsp;&nbsp; Set objFolder = objShell.Namespace(StrConv(FilePath, vbFromUnicode))<br />
&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp; If Not objFolder Is Nothing Then<br />
&nbsp;&nbsp;&nbsp;&nbsp; Set objFolderItem = objFolder.ParseName(StrConv(FileName, vbFromUnicode))<br />
&nbsp;&nbsp;&nbsp;&nbsp; End If<br />
&nbsp;&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp; If Not objFolderItem Is Nothing Then<br />
&nbsp;&nbsp;&nbsp;&nbsp; GetFileOwner = objFolder.GetDetailsOf(objFolderItem, 8)<br />
&nbsp;&nbsp;&nbsp;&nbsp; Else<br />
&nbsp;&nbsp;&nbsp;&nbsp; GetFileOwner = ""<br />
&nbsp;&nbsp;&nbsp;&nbsp; End If<br />
&nbsp;&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp; Set objShell = Nothing<br />
&nbsp;&nbsp; Set objFolder = Nothing<br />
&nbsp;&nbsp; Set objFolderItem = Nothing<br />
&nbsp;&nbsp; <br />
End Function</p>&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10262309/i-want-to-speed-up-my-macro.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:00:50 GMT</pubDate></item><item><title><![CDATA[Bindingnavigator.addnew update with values from text boxes]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10262284/bindingnavigatoraddnew-update-with-values-from-text-boxes.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10262284/bindingnavigatoraddnew-update-with-values-from-text-boxes.aspx]]></link><description><![CDATA[Hello I am trying to add a row to a bindingsource using .addnew and then update two coloums in the row to values that are housed in text boxes. &nbsp;
<div><br />
</div>
<div>The code I have is as follows and it adds the new row but I am not sure how to get the values I need passed. &nbsp;Any help on how to pass the values in those text boxes to my bindingsource / datagridview would be helpful. &nbsp;I also have a save item that will save it without an issue.&nbsp;</div>
<div><br />
</div>
<div>Thanks.</div>
<div><br />
</div>
<div>
<div class="reCodeBlock" style="border: 0px  solid  #7f9db9;overflow-y: auto;">
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">Private</code> <code style="color: #006699; font-weight: bold;">Sub</code> <code style="color: #000000;">BindingNavigator1AddItem_Click(</code><code style="color: #006699; font-weight: bold;">ByVal</code> <code style="color: #000000;">sender </code><code style="color: #006699; font-weight: bold;">As</code> <code style="color: #000000;">System.</code><code style="color: #006699; font-weight: bold;">Object</code><code style="color: #000000;">, </code><code style="color: #006699; font-weight: bold;">ByVal</code> <code style="color: #000000;">e </code><code style="color: #006699; font-weight: bold;">As</code> <code style="color: #000000;">System.EventArgs)</code></span></div>
<div style="background-color: #fff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 15px !important;"><code style="color: #006699; font-weight: bold;">Dim</code> <code style="color: #000000;">newRow </code><code style="color: #006699; font-weight: bold;">As</code> <code style="color: #000000;">DataRowView = AddressesBindingSource.AddNew()</code></span></span></div>
<div style="background-color: #fff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 15px !important;"><code style="color: #000000;">newRow(</code><code style="color: blue;">"caseNumber"</code><code style="color: #000000;">) = </code><code style="color: #006699; font-weight: bold;">Me</code><code style="color: #000000;">.CaseNumberTextBox</code></span></span></div>
<div style="background-color: #fff;"><span><code>&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 15px !important;"><code style="color: #000000;">newRow(</code><code style="color: blue;">"InterestID"</code><code style="color: #000000;">) = </code><code style="color: #006699; font-weight: bold;">Me</code><code style="color: #000000;">.InterestIDTextBox</code></span></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #fff;"><span><code>&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 15px !important;"><code style="color: #000000;">AddressesBindingSource.EndEdit()</code></span></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #fff;"><span style="margin-left: 0px !important;">&nbsp;</span></div>
<div style="background-color: #ffffff;"><span><code>&nbsp;</code><span style="margin-left: 3px !important;"><code style="color: #006699; font-weight: bold;">End</code> <code style="color: #006699; font-weight: bold;">Sub</code></span></span></div>
</div>
<br />
</div>&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10262284/bindingnavigatoraddnew-update-with-values-from-text-boxes.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:00:50 GMT</pubDate></item><item><title><![CDATA[VBscript Event handling in the application opened using WScript.Shell]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10262211/vbscript-event-handling-in-the-application-opened-using-wscriptshell.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10262211/vbscript-event-handling-in-the-application-opened-using-wscriptshell.aspx]]></link><description><![CDATA[Hi,<br />
<br />
I want to detect whether a particular keypress happened(Printscreen) in the application which is opened with the help of WScript.Shell command. <br />
<br />
After detecting this, I will do some actions in the vbscript... Please help me out...<br />
<br />
I have opened putty and using Sendkeys method, I have successfully logged into the server.. Now I want to detect the key strokes (Printscreen), in the opened window back in the vbscript...<br />
<br />
The following is some part of the code:<br />
<br />
Set ss = CreateObject("WScript.Shell")<br />
ss.run "F:\putty.exe"<br />
...<br />
ss.SendKeys "10.39.141.30{tab}{tab}{left}{left}{tab}{tab}{tab}{tab}{tab}{tab}{tab}"<br />
ss.SendKeys "{enter}"<br />
.....<br />
...&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10262211/vbscript-event-handling-in-the-application-opened-using-wscriptshell.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:00:50 GMT</pubDate></item><item><title><![CDATA[record set comparison in vb6.0]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10261521/record-set-comparison-in-vb60.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10261521/record-set-comparison-in-vb60.aspx]]></link><description><![CDATA[Hi &nbsp;all
<div><br />
</div>
<div>I want to compare &nbsp;the record set value of two database&nbsp;</div>
<div><br />
</div>
<div>how i have wriiten is&nbsp;</div>
<div><br />
</div>
<div>If rs1.fields(0).Value &lt;&gt; rS.fields(0).Value Then</div>
<div>here i am comparing &nbsp;values&nbsp;</div>
<div><br />
</div>
<div>But i want to increase the row like next iteration it should go to next id of that column</div>
<div><br />
</div>
<div>How its possible in visual basic</div>
<div><br />
</div>
<div>Can any one help me pls</div>&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10261521/record-set-comparison-in-vb60.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:00:51 GMT</pubDate></item><item><title><![CDATA[codes in seaching data in ADODC and dataGrid]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10261227/codes-in-seaching-data-in-adodc-and-datagrid.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10261227/codes-in-seaching-data-in-adodc-and-datagrid.aspx]]></link><description><![CDATA[We are doing a thesis, and we are encountered problems in coding each command and linking them, i hope you will help us. <br />
Here are some of our problems:<br />
<br />
1.what is the codes in searching information or data in ADODC using DataGrid using VB6.<br />
<br />
scenario: when i select or choose from cmbobox it will appear or automatically inserted in datagrid.<br />
<br />
2. codes in editing data in datagrid<br />
<br />
scenario: what i want to do is, when i select the field in datagrid iwant it also to show or automatically inserted in their specific location like combobox and text box..<br />
<br />
&nbsp;&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10261227/codes-in-seaching-data-in-adodc-and-datagrid.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:00:51 GMT</pubDate></item><item><title><![CDATA[Add bindingnavigator to datarepeater on a tabcontrol]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10260519/add-bindingnavigator-to-datarepeater-on-a-tabcontrol.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10260519/add-bindingnavigator-to-datarepeater-on-a-tabcontrol.aspx]]></link><description><![CDATA[Hello,
<div><br />
</div>
<div>I am trying to add a bindingnavigator to a datarepeater on a tabcontrol. &nbsp;For whatever reason when I pull the data on the the repeater when its on a tabcontrol it does not create it automatically like it would on a normal form. &nbsp;Any help would be greatly appreciated.</div>
<div><br />
</div>
<div>Thanks,</div>
<div><br />
</div>
<div>George</div>&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10260519/add-bindingnavigator-to-datarepeater-on-a-tabcontrol.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:00:51 GMT</pubDate></item><item><title><![CDATA[find text between delimiters in txt file]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10257483/find-text-between-delimiters-in-txt-file.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10257483/find-text-between-delimiters-in-txt-file.aspx]]></link><description><![CDATA[<span style="line-height: 16px; font-size: 11px;">
<div>Sorry Duplicate post:&nbsp;</div>
<div><br />
</div>
<div>See&nbsp;<span style="font-size: 13px; line-height: normal;"><a href="http://www.eggheadcafe.com/community/aspnet/8/10257067/find-text-between-delimiters-in-txt-file.aspx">http://www.eggheadcafe.com/community/aspnet/8/10257067/find-text-between-delimiters-in-txt-file.aspx</a></span>
</div>
</span>&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10257483/find-text-between-delimiters-in-txt-file.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:00:53 GMT</pubDate></item><item><title><![CDATA[find text between delimiters in txt file]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10257067/find-text-between-delimiters-in-txt-file.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10257067/find-text-between-delimiters-in-txt-file.aspx]]></link><description><![CDATA[Hi,
<div><br />
</div>
<div>I have a text file which has multiple lines in it which is generated by a webpage. I need to search through nit and obtain certain details. It is set up in the following format:</div>
<div><br />
</div>
<div><span class="Apple-tab-span" style="white-space: pre;">	</span><em>General text of no importance</em></div>
<div><em><span class="Apple-tab-span" style="white-space: pre;">	</span>Case_Number='9443245'</em></div>
<div><em><span class="Apple-tab-span" style="white-space: pre;">	</span>Case_Name='Paintings of the ages'</em></div>
<div><em><br />
</em></div>
<div>I need to be able to sift though via a vb script and pull just the number <em>9445345</em>&nbsp;and name&nbsp;<em>Paintings of the ages </em>and turn these into strings (or other) so that they can be passed to Excel?</div>
<div><br />
</div>
<div>Many Thanks</div>
<div><br />
</div>
<div>Sean</div>
<div><em><br />
</em></div>
<div>OK,
</div>
<div><em><br />
</em></div>
<div>I've changed the incoming format to:</div>
<div>
<div style="font-style: normal;"><em>General text of no importance - can be multiple lines</em></div>
<div style="font-style: normal;"><em><span class="Apple-tab-span" style="white-space: pre;">	</span>Case_Number=@9443245@</em></div>
<div style="font-style: normal;"><em><span class="Apple-tab-span" style="white-space: pre;">	</span>Case_Name=@Paintings of the ages@</em></div>
<div style="font-style: normal;"><em><br />
</em></div>
<div>What I have so far is:</div>
<div><br />
</div>
<div>
<div style="font-style: italic;">Set objRegExp = CreateObject("VBScript.RegExp")</div>
<div style="font-style: italic;"><span style="font-style: normal;"><em>
<div style="display: inline !important;"><em>
<div style="display: inline !important;">objRegExp.Global = True</div>
</em></div>
</em></span></div>
<div style="font-style: italic;">objRegExp.IgnoreCase = True</div>
<div style="font-style: italic;">objRegExp.Multiline = True</div>
<div style="font-style: italic;">objRegExp.Pattern = ([a-zA-Z@]$) ([0-9a-zA-Z@]*\@)</div>
<div style="font-style: italic;">Set Matches = objRegExp.Execute("C:\output.txt")</div>
<div style="font-style: italic;"><br />
</div>
<div>However this is failing on the \ in the pattern</div>
</div>
<div><br />
</div>
</div>
<div>Can anyone tell me where it's going wrong?</div>
<div><br />
</div>
<div>Thanks in advance</div>
<div><br />
</div>
<div>Sean</div>
<div><em><br />
</em></div>
<div><em><strong>Solved for:&nbsp;</strong></em></div>
<div><em><br />
</em></div>
<div>
<div style="font-style: normal;"><span class="Apple-tab-span" style="white-space: pre;">	</span><em>General text of no importance</em></div>
<div style="font-style: normal;"><em><span class="Apple-tab-span" style="white-space: pre;">	</span>Case_Number='9443245'</em></div>
<div style="font-style: normal;"><em><span class="Apple-tab-span" style="white-space: pre;">	</span>Case_Name='Paintings of the ages'</em></div>
<div style="font-style: normal;"><em><br />
</em></div>
<div>The pattern needs to be changed to:</div>
<div style="font-style: normal;"><em><br />
</em></div>
</div>
<div><em>objRegExp.Pattern = "Case_Number='[0-9a-zA-Z]+'"</em></div>
<div><em>
<div>For Each Match In Matches</div>
<div><span class="Apple-tab-span" style="white-space: pre;">		</span>StrNumber = Match.value</div>
<div><span class="Apple-tab-span" style="white-space: pre;">	</span>Next</div>
<div><span class="Apple-tab-span" style="white-space: pre;">	</span>StrNumber = mid(StrNumber, 14, len(StrNumber)-14)</div>
</em></div>
<div><em><br />
</em></div>
<div>
<div style="font-style: normal;"><em>objRegExp.Pattern = "Case_Name='[0-9a-zA-Z]+'"</em></div>
<div>
<div style="font-style: italic;">For Each Match In Matches</div>
<div style="font-style: italic;"><span class="Apple-tab-span" style="white-space: pre;">		</span>StrName = Match.value</div>
<div style="font-style: italic;"><span class="Apple-tab-span" style="white-space: pre;">	</span>Next</div>
<div style="font-style: italic;"><span class="Apple-tab-span" style="white-space: pre;">	</span>StrName = mid(StrName, 12, len(StrName)-12)</div>
<div style="font-style: italic;"><br />
</div>
<div>Just in case it helps someone!</div>
</div>
</div>
<div><em><br />
</em></div>
<div><em><br />
</em></div>
<div><em><span class="Apple-tab-span" style="white-space: pre;">	</span></em></div>&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10257067/find-text-between-delimiters-in-txt-file.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:00:53 GMT</pubDate></item><item><title><![CDATA[How to compare two record set  of different database]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10256452/how-to-compare-two-record-set--of-different-database.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10256452/how-to-compare-two-record-set--of-different-database.aspx]]></link><description><![CDATA[<br />
Hi<br />
<br />
&nbsp;&nbsp;&nbsp;If rs1.fields(i).Value = rS.fields(j)(c).Value Then &nbsp;
<div>&nbsp;i want to know the syntax of this is correct or not?</div>
<div><br />
</div>
<div><br />
</div>
<div>What is my requirement &nbsp;</div>
<div>&nbsp;i am &nbsp;comparing two record set of different database&nbsp;</div>
<div>&nbsp;i is client record set index value</div>
<div>and j is server&nbsp;</div>
<div>but i want to increase only the row of that particular column</div>
<div>here table is employee&nbsp;</div>
<div>In that emp id i am comparing so emp id is index i and j</div>
<div>i want to increase the row of that particular column</div>
<div><br />
</div>
<div>I am disclosing ma code below</div>
<div><br />
</div>
<div><br />
<div><br />
</div>
<div>Private Sub Command2_Click()</div>
<div>X = 0</div>
<div>Y = 0</div>
<div><br />
</div>
<div>&nbsp;&nbsp; &nbsp;Call Db_Connection</div>
<div>&nbsp;&nbsp; &nbsp;</div>
<div>&nbsp;&nbsp; &nbsp;If rs1.State = 1 Then rs1.Close</div>
<div>&nbsp;&nbsp; &nbsp;sql1 = "select Emp_id from Emp &nbsp;order by Emp_id"</div>
<div>&nbsp;&nbsp; &nbsp;rs1.Open sql1, dBConnTT, adOpenKeyset, adLockOptimistic</div>
<div>&nbsp;&nbsp; &nbsp;ClientCount = rs1.RecordCount</div>
<div>&nbsp;&nbsp;&nbsp;</div>
<div>&nbsp;&nbsp; &nbsp;</div>
<div>&nbsp;&nbsp; &nbsp; If rS.State = 1 Then rS.Close</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;sql = "select Emp_id from emp order by Emp_id"</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;rS.Open sql, MyConn, adOpenKeyset, adLockOptimistic</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;ServerCount = rS.RecordCount</div>
<div>&nbsp;&nbsp;&nbsp;</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp;' for client database</div>
<div>&nbsp;&nbsp; &nbsp;</div>
<div>&nbsp;&nbsp; &nbsp; For i = 0 To ClientCount</div>
<div>&nbsp;&nbsp;&nbsp;</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; flag = 0</div>
<div>&nbsp;&nbsp; &nbsp;&nbsp;</div>
<div>&nbsp;&nbsp; &nbsp; 'for server database</div>
<div>&nbsp;&nbsp; &nbsp;</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; For j = 0 To ServerCount</div>
<div>&nbsp;&nbsp; &nbsp; 'Call Db_Connection</div>
<div><br />
</div>
<div>&nbsp;&nbsp; &nbsp; If rs1.fields(i).Value = rS.fields(j)(c).Value Then</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;flag = 1</div>
<div>&nbsp;&nbsp; &nbsp; End If</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div>
<div>&nbsp;&nbsp; &nbsp;' break</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; If flag = 0 Then</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NewEmp(X) = rs1.fields(i).Value</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;X = X + 1</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;End If</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Next j</div>
<div><br />
</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</div>
<div>' &nbsp; &nbsp;If rs1.State = 1 Then rs1.Close</div>
<div>' &nbsp; &nbsp;sql1 = "select Emp_id from Emp &nbsp;order by Emp_id"</div>
<div>' &nbsp; &nbsp;rs1.Open sql1, dBConnTT, adOpenStatic, adLockReadOnly</div>
<div>&nbsp;&nbsp; &nbsp; Next i</div>
<div>End Sub</div>
<br />
<br />
PLEASE HELP ME<br />
its urgent<br />
<br />
<br />
Thanks all<br />
<br />
</div>&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10256452/how-to-compare-two-record-set--of-different-database.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:00:53 GMT</pubDate></item><item><title><![CDATA[data grid contol and adodc]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10256260/data-grid-contol-and-adodc.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10256260/data-grid-contol-and-adodc.aspx]]></link><description><![CDATA[I am working on an management project and wants to display the data of Access on data Grid control of vb6.0.<br />
I&nbsp;am finding difficulty in displaying the data in data grid with the help of code i.e.,the data should be displayed at runtime and its manipulation could be seen immediately.<br />
Any help is Appreciated!<br />
reply&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10256260/data-grid-contol-and-adodc.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:00:54 GMT</pubDate></item><item><title><![CDATA[Adding / deleting a scheduled task using VBScript]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10255418/adding--deleting-a-scheduled-task-using-vbscript.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10255418/adding--deleting-a-scheduled-task-using-vbscript.aspx]]></link><description><![CDATA[Good morning all, <br />
<br />
I tried to add a scheduled task as shown below but it didn't work (using a VBS file). <br />
&nbsp; <br />
strComputer = "." <br />
Set objWMIService = GetObject("winmgmts:" _ <br />
&amp; "{impersonationLevel=impersonate}!\\" &amp; strComputer &amp; "\root\cimv2") <br />
Set objNewJob = objWMIService.Get("Win32_ScheduledJob")errJobCreated = objNewJob.Create _ <br />
("C:\222\test.xls", "********073000.000000-420", _ <br />
True , 1 Or 2 Or 4 Or 8 Or 16, 32 ,64 , JobID) <br />
Wscript.Echo errJobCreated &nbsp; <br />
&nbsp; <br />
Over and above a code to delete a schedules task. <br />
&nbsp; <br />
Please help ASAP. <br />
&nbsp;&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10255418/adding--deleting-a-scheduled-task-using-vbscript.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:00:55 GMT</pubDate></item><item><title><![CDATA[mutiple keyword search in file]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10255045/mutiple-keyword-search-in-file.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10255045/mutiple-keyword-search-in-file.aspx]]></link><description><![CDATA[<br />
Can anyone help me on how to search a file with multiple keyword, e.g instead of searching for one word at a time,<br />
I want to search a file for multiple keywords like "onekeyword, twokeyword, threekwyword" at once.<br />
<br />
Is this possible?&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10255045/mutiple-keyword-search-in-file.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:00:55 GMT</pubDate></item><item><title><![CDATA[Get OCX Path]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10254532/get-ocx-path.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10254532/get-ocx-path.aspx]]></link><description><![CDATA[<table border="0" cellspacing="0" cellpadding="2" width="100%">
    <tbody>
        <tr>
            <td align="left">I'm creating a object by using a 3rd pary OCX like this. <br />
            <br />
            loObj = CREATEOBJECT("OCXname") <br />
            How can I check this Ocx's registered path without adding this object to a form.</td>
        </tr>
    </tbody>
</table>&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10254532/get-ocx-path.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:00:55 GMT</pubDate></item><item><title><![CDATA[UserForm- Populate comboBox based on a selection from another]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10254246/userform-populate-combobox-based-on-a-selection-from-another.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10254246/userform-populate-combobox-based-on-a-selection-from-another.aspx]]></link><description><![CDATA[<p><font size="2" face="Arial"><span style="font-family: arial; font-size: 10pt;">I am in the process of creating a userform (picture attached) that allows a doctor to specify up to 8 different drugs for a treatment regime</span></font></p>
<p><font size="2" face="Arial"><span style="font-family: arial; font-size: 10pt;">&nbsp;</span></font></p>
<p><font size="2" face="Arial"><span style="font-family: arial; font-size: 10pt;">There are 85 possible drugs to choose from, and so for each of the required drugs, what I wanted to do is narrow the list <span class="GramE">down a little bit using</span> a first letter selection, and adding items based on that, maximum about 15. However, this would result in an enormous amount of code, because for each of the 8 drug selections I have to write specific code for cmbLetter1, cmbLetter2<span class="GramE">......cmbLetter8</span> to match up with cmbDrugs1.....cmbDrugs8. <span class="GramE">And</span> for each of these I have to repeat the 85 entries. </span></font></p>
<p><font size="2" face="Arial"><span style="font-family: arial; font-size: 10pt;">&nbsp;</span></font></p>
<p><font size="2" face="Arial"><span style="font-family: arial; font-size: 10pt;">But I know there must be a better way to do this<span class="GramE">!!</span></span></font></p>
<p><font size="2" face="Arial"><span style="font-family: arial; font-size: 10pt;">&nbsp;</span></font></p>
<p><font size="2" face="Arial"><span style="font-family: arial; font-size: 10pt;">There are <span class="GramE">2</span> attachments</span></font></p>
<ol style="margin-top: 0cm; list-style-type: decimal;">
    <li><font size="2" face="Arial"><span style="font-family: arial; font-size: 10pt;">A screen cap of the userform</span></font> </li>
    <li><font size="2" face="Arial"><span style="font-family: arial; font-size: 10pt;">Code sample for above problem (below)</span></font></li>
</ol>
<span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp; </span><font size="2" face="Arial"><span style="font-family: arial; font-size: 10pt;">
<p><span style="font-size: 11pt; color: #333399;">Private Sub</span><span style="font-size: 11pt;"> UserForm_Initialize()</span></p>
<p><span style="font-size: 11pt; color: #339966;">'This will populate all the cmbLetter (1,2,3,4,5,6,7,8) with the .AddItem values</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp; <span style="color: #333399;">Dim</span> tmpLetter <span style="color: #333399;">As</span> Control</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp; </span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp; <span style="color: #333399;">For Each</span> tmpLetter <span style="color: #333399;">In</span> Me.Controls</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #333399;">If I</span>nStr(tmpLetter.Name, "cmbLetter") <span style="color: #333399;">Then</span></span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #333399;">With</span> tmpLetter</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "A-B"</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "C"</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "D-F"</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "G-I"</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "L-O"</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "P-S"</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "T-Z"</span></p>
<p><span style="font-size: 11pt; color: #333399;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;End With</span></p>
<p><span style="font-size: 11pt; color: #333399;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If</span></p>
<p><span style="font-size: 11pt; color: #333399;">&nbsp;&nbsp;&nbsp; Next</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp; </span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp; <span style="color: #333399;">With</span> Me</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Height = 162</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .cmdOK.Top = 84</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .cmdCancel.Top = 84</span></p>
<p><span style="font-size: 11pt; color: #333399;">&nbsp;&nbsp;&nbsp; End With</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp; </span></p>
<div style="padding: 0cm 0cm 1pt;">
<p style="border: medium none; padding: 0cm;"><span style="font-size: 11pt; color: #333399;">End Sub</span></p>
</div>
<p><span style="font-size: 11pt;">&nbsp;</span></p>
<p><span style="font-size: 11pt; color: #333399;">Private Sub</span><span style="font-size: 11pt;"> cmbLetter_AfterUpdate()</span></p>
<p><span style="font-size: 11pt; color: #339966;">'Provides a list of drugs no longer than 15 in length in the cmbDrug list</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp; <span style="color: #333399;">Dim</span> tmpCombo <span style="color: #333399;">As</span> Control</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp; <span style="color: #333399;">&nbsp;Dim</span> tmpLetter <span style="color: #333399;">As</span> Control</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp; </span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp; <span style="color: #333399;">If </span>Me.cmbLetter1.Text = "A-B" <span style="color: #333399;">Then</span></span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #333399;">With</span> Me.cmbDrugs1</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "Actinomycin D"</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "Alemtuzumab"</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "Amsacrine"</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "Arsenic Trioxide"</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "Azathioprine"</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "Bacillus Calmette - Guerin(BCG)"</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "Bevacizumab"</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "Bleomycin"</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "Bortezomib"</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "Busulfan"</span></p>
<p><span style="font-size: 11pt; color: #333399;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End With</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp; <span style="color: #333399;">ElseIf</span> Me.cmbLetter1 = "C" <span style="color: #333399;">Then</span></span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #333399;">With </span>Me.cmbDrugs1</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "Capecitabine"</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "Carboplatin"</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "Carmustine"</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "Cetuximab"</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "Chlorambucil"</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "Cisplatin"</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "Cladribine"</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "Cyclophosphamide"</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "Cyclosporin"</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "Cytarabine"</span></p>
<p><span style="font-size: 11pt; color: #333399;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End With</span></p>
<p><span style="font-size: 11pt;">&nbsp; <span style="color: #333399;">&nbsp;&nbsp;ElseIf</span> Me.cmbLetter1 = "D-F" <span style="color: #333399;">Then</span></span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #333399;">With</span> Me.cmbDrugs1</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "Dacarbazine"</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "Dasatinib"</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "Daunorubicin"</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "Docetaxel"</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "Doxorubicin"</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "Doxorubicin Liposomal"</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "Epirubicin"</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "Erlotinib"</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;.AddItem "Etoposide"</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "Etoposide Phosphate"</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "Everolimus"</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "Fludarabine"</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "Fluorouracil"</span></p>
<p><span style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem "Fotemustine"</span></p>
<p><span style="font-size: 11pt; color: #333399;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End With</span></p>
<p><span style="font-size: 11pt; color: #339966;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'plus another 51 drug entries. </span></p>
<p><span style="font-size: 11pt; color: #339966;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'Unless there is a better way, this will have to be done 8 whole times!</span></p>
<p><span style="font-size: 11pt; color: #333399;">&nbsp;&nbsp;&nbsp; End If</span></p>
<div style="padding: 0cm 0cm 1pt;">
<p style="border: medium none; padding: 0cm;"><span style="font-size: 11pt; color: #333399;">End Sub</span></p>
<p style="border: medium none; padding: 0cm;"> <span style="font-size: 11pt; color: #333399;"></span></p>
<p style="border: medium none; padding: 0cm;"><span style="font-size: 11pt; color: #333399;"><img alt="" src="/FileUpload/-1099508745/Custom%20drug%20Form.JPG" /><br />
</span></p>
</div>
</span></font>&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10254246/userform-populate-combobox-based-on-a-selection-from-another.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:00:56 GMT</pubDate></item><item><title><![CDATA[how to connect the query in flexgrid and in combo box?]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10252786/how-to-connect-the-query-in-flexgrid-and-in-combo-box.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10252786/how-to-connect-the-query-in-flexgrid-and-in-combo-box.aspx]]></link><description><![CDATA[i need to create a program, and that is library system now in that program i will input the students data, books data, and query or search i use the visual basic 6.0. my teacher said i need to create flex grid and in flex grid i will connect the query&nbsp; but i don't know how? and i will create also a combo box, in combo box will be inputted the category of the books examples English, Math, Science and when you click one of the category in flex grid all the books of the chosen category will be appear. but i' am just new in visual basic I don't know what to do...please help me?&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10252786/how-to-connect-the-query-in-flexgrid-and-in-combo-box.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:01:03 GMT</pubDate></item><item><title><![CDATA[Windows media player in vb6]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10252654/windows-media-player-in-vb6.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10252654/windows-media-player-in-vb6.aspx]]></link><description><![CDATA[end of post&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10252654/windows-media-player-in-vb6.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:01:03 GMT</pubDate></item><item><title><![CDATA[PowerPoint 2007 Using a shape as macro trigger when clicked on]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10251711/powerpoint-2007-using-a-shape-as-macro-trigger-when-clicked-on.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10251711/powerpoint-2007-using-a-shape-as-macro-trigger-when-clicked-on.aspx]]></link><description><![CDATA[<br />
I have several differtent shapes on one slide. I would like to change text when I click on the shape.<br />
<br />
I created the macro's which work when I step throught them in Developer and they change the text ok&nbsp;. I link the macro to the shape using the Action button.<br />
<br />
Only the first macro I linked to the first shape works proper. All others make work once or inconsistenly. When I move the mouse over the shapes it indicates there is a link there with the fist.&nbsp;<br />
<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10251711/powerpoint-2007-using-a-shape-as-macro-trigger-when-clicked-on.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:01:04 GMT</pubDate></item><item><title><![CDATA[How to Log-Out and Back to Log-In in MDI Form]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10250871/how-to-logout-and-back-to-login-in-mdi-form.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10250871/how-to-logout-and-back-to-login-in-mdi-form.aspx]]></link><description><![CDATA[i can't debug my program. i want to log-out my MDIForm then back to Log-In form but it seem not working because&nbsp;every time&nbsp;i click mnuLog(used to Log-Out and Back to LogIn form) and confirm the msgbox the log-in form shows and then MDI form will appear to even though i did not log in. please help me.&nbsp;<br />
These are the codes
<div><br />
</div>
<div>frmLogIn:</div>
<div><br />
</div>
<div>
<div>Dim UN</div>
<div>Private Sub cmdCancel_Click()</div>
<div>&nbsp;MsgBox "Program Terminated!!!"</div>
<div>&nbsp;End</div>
<div>End Sub</div>
<div><br />
</div>
<div>Private Sub cmdLogin_Click()</div>
<div>&nbsp;&nbsp; &nbsp;Adodc1.Refresh</div>
<div>&nbsp;&nbsp; &nbsp;</div>
<div>&nbsp;&nbsp; &nbsp;Static Ctr As Integer</div>
<div>&nbsp;&nbsp; &nbsp;Dim m As Object</div>
<div>&nbsp;&nbsp; &nbsp;</div>
<div>&nbsp;&nbsp; &nbsp;Set m = Adodc1.Recordset</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</div>
<div>&nbsp;&nbsp; &nbsp;</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</div>
<div>&nbsp;&nbsp; &nbsp;If Ctr = 3 Then</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;MsgBox "Program Terminated!!!"</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;End</div>
<div>&nbsp;&nbsp; &nbsp;Else</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;m.Find "User_Name = '" + UCase(txtUsername) + "'"</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;If m.EOF = True Or m.BOF = True Then</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;MsgBox "Access Denied!!!"</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Ctr = Ctr + 1</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Else</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;If m(4) &lt;&gt; UCase(txtPassword) Then</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;MsgBox "Access Denied!!!"</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Ctr = Ctr + 1</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Else</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Text1 = UCase(txtUsername)</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Text2 = m("USER_name")</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;MsgBox "Welcome " + UCase(txtUsername) + "!.."</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;frmLogIn.Visible = False</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;frmLoading.Visible = True</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;End If</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;End If</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</div>
<div>&nbsp;&nbsp; &nbsp;End If</div>
<div>&nbsp;&nbsp;</div>
<div>&nbsp;&nbsp; &nbsp;txtUsername.Text = clr</div>
<div>&nbsp;&nbsp; &nbsp;txtPassword.Text = clr</div>
<div>&nbsp;&nbsp; &nbsp;</div>
<div>&nbsp;&nbsp; &nbsp;&nbsp;</div>
<div>End Sub</div>
<div><br />
</div>
<div>Private Sub Command1_Click()</div>
<div>MsgBox "Thank you ! Come Again !", vbInformation, "Thank you !"</div>
<div>End</div>
<div>End Sub</div>
<div>Private Sub Form_Unload(Cancel As Integer)</div>
<div>Unload Me</div>
<div>End Sub</div>
<div>Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)</div>
<div>Cancel = True</div>
<div>End Sub</div>
<div><br />
</div>
<div>Private Sub Timer1_Timer()</div>
<div>Label1.Caption = Now()</div>
<div>End Sub</div>
<div><br />
</div>
</div>
<div>frmMain --&gt; MDIForm :</div>
<div><br />
</div>
<div>
<div>Option Explicit</div>
<div>Private Sub MDIForm_Unload(Cancel As Integer)</div>
<div>&nbsp;&nbsp; &nbsp;If MsgBox("Are you sure you want? if you click yes back to login OR if you click no automatically exit", vbQuestion + vbYesNo, "Confirm Exit") = vbNo Then</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; End</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; End If</div>
<div>&nbsp;&nbsp; &nbsp;Dim frm As Form</div>
<div>&nbsp;&nbsp; &nbsp;For Each frm In Forms</div>
<div>&nbsp;&nbsp; &nbsp;Unload frm</div>
<div>''If frmLogIn.Visible = True Then</div>
<div>''Unload Me</div>
<div>''End If</div>
<div>&nbsp;&nbsp; &nbsp;Next</div>
<div>End Sub</div>
<div>Private Sub mnuExit_Click()</div>
<div>MsgBox "Thank you come again !", vbInformation, "Exit system"</div>
<div>End</div>
<div>End Sub</div>
<div>Private Sub mnulog_Click()</div>
<div>Dim ask As String</div>
<div>ask = MsgBox("Do you want to log out?", vbQuestion + vbYesNo, "Are you sure?")</div>
<div>If ask = vbNo Then</div>
<div>Exit Sub</div>
<div>Else</div>
<div>Unload Me</div>
<div>frmLogIn.Show</div>
<div>End If</div>
<div>End Sub</div>
</div>
<div><br />
</div>
<div>I hope you can help me with this. Thank you for your kindness.<br />
</div>&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10250871/how-to-logout-and-back-to-login-in-mdi-form.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:01:04 GMT</pubDate></item><item><title><![CDATA[VBS, IExplore.aplication, Dropdownlist]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10250194/vbs-iexploreaplication-dropdownlist.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10250194/vbs-iexploreaplication-dropdownlist.aspx]]></link><description><![CDATA[Hello all,<br />
<br />
<span class="pBody postableBody">I'm trying to automate Internet Explorer.<br />
The goal is to use IE to open a page and make a "certain" select from a drop down box.</span><br />
The script so far is something like:<br />
<pre><font><font color="blue">Option Explicit<br />Dim strOption<br />With CreateObject("InternetExplorer.Application")<br />  .Fullscreen = True<br />  .Visible = True<br />  .Navigate "http://some URL//........"<br />  Do While .Busy<br />    WScript.Sleep 100<br />  Loop<br />  .Document.getElementByID("celldropdownlist").Value = strOption<br />End With<br /></font></font>
The result after i run this script is: IE loads ok and opens the page, from the dropdownlist i get my selection ok.... but nothing happens. The page should modify once with changing the value from the dropdown list.
Any thoughts are welcomed.

Br.
Andi
</pre>&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10250194/vbs-iexploreaplication-dropdownlist.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:01:04 GMT</pubDate></item><item><title><![CDATA[crystal Report Export to Excel]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10247149/crystal-report-export-to-excel.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10247149/crystal-report-export-to-excel.aspx]]></link><description><![CDATA[Hi,<br />
&nbsp;i m using the same piece of code as u given to me,,,,,,,,,,but line and image doesn't export(i.e disappear)<br />
the code is as below:<br />
<div class="reCodeBlock" style="overflow-y: auto;border: #7f9db9 0px solid;">
<div style="background-color: #ffffff;"><span style="margin-left: 0px! important;"><code style="font-weight: bold; color: #006699;">Option</code> <code style="color: #000000;">Explicit</code></span></div>
<div style="background-color: #fff;"><span style="margin-left: 0px! important;"><code style="color: #008200;">'Add a reference to CR xx.x ActiveX Designer Runtim Library</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px! important;"><code style="font-weight: bold; color: #006699;">Private</code> <code style="font-weight: bold; color: #006699;">Sub</code> <code style="color: #000000;">Command1_Click()</code></span></div>
<div style="background-color: #fff;"><span style="margin-left: 0px! important;"><code style="font-weight: bold; color: #006699;">Dim</code> <code style="color: #000000;">crApp </code><code style="font-weight: bold; color: #006699;">As</code> <code style="color: #000000;">CRAXDRT.Application</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px! important;"><code style="font-weight: bold; color: #006699;">Dim</code> <code style="color: #000000;">oRpt </code><code style="font-weight: bold; color: #006699;">As</code> <code style="color: #000000;">CRAXDRT.Report</code></span></div>
<div style="background-color: #fff;"><span style="margin-left: 0px! important;"><code style="font-weight: bold; color: #006699;">Set</code> <code style="color: #000000;">crApp = </code><code style="font-weight: bold; color: #006699;">New</code> <code style="color: #000000;">CRAXDRT.Application</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px! important;"><code style="font-weight: bold; color: #006699;">Set</code> <code style="color: #000000;">oRpt = crApp.OpenReport(</code><code style="color: blue;">"D:\Report1.rpt"</code><code style="color: #000000;">, 1)</code></span></div>
<div style="background-color: #fff;"><span style="margin-left: 0px! important;"><code style="color: #000000;">oRpt.ExportOptions.DestinationType = crEDTDiskFile</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px! important;"><code style="color: #000000;">oRpt.ExportOptions.DiskFileName = </code><code style="color: blue;">"D:\Report1.xls"</code></span></div>
<div style="background-color: #fff;"><span style="margin-left: 0px! important;"><code style="color: #000000;">oRpt.ExportOptions.FormatType = crEFTExcel80</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px! important;"><code style="color: #000000;">oRpt.ExportOptions.ExcelUseConstantColumnWidth = </code><code style="font-weight: bold; color: #006699;">True</code></span></div>
<div style="background-color: #fff;"><span style="margin-left: 0px! important;"><code style="color: #000000;">oRpt.Export </code><code style="font-weight: bold; color: #006699;">False<br />
</code></span></div>
<div style="background-color: #ffffff;"><span style="margin-left: 0px! important;"><code style="font-weight: bold; color: #006699;">End</code> <code style="font-weight: bold; color: #006699;">Sub<br />
<br />
This code doesn't wort for line and image export,but data is exported properly.<br />
<br />
if anyone has solution for this......then please help<br />
<br />
<br />
Thanks in advance</code></span></div>
</div>&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10247149/crystal-report-export-to-excel.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:01:05 GMT</pubDate></item><item><title><![CDATA[Win32 console application,access .sys file using Visual C++]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10241821/win32-console-applicationaccess-sys-file-using-visual-c.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10241821/win32-console-applicationaccess-sys-file-using-visual-c.aspx]]></link><description><![CDATA[I want to write a program in Visual Studio using C++ which can access .sys file properties. We want to create a win32 console application for the same.&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10241821/win32-console-applicationaccess-sys-file-using-visual-c.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:01:16 GMT</pubDate></item><item><title><![CDATA[Testing tools]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10235780/testing-tools.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10235780/testing-tools.aspx]]></link><description><![CDATA[Are there any testing tool for VB 6, VB 5.0 and VB 3.0<br />
<br />
If yes can you please provide details for the same.<br />
<br />
Its kind of urgent for me&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10235780/testing-tools.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:01:19 GMT</pubDate></item><item><title><![CDATA[Sepcifying printer in vb script]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10234112/sepcifying-printer-in-vb-script.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10234112/sepcifying-printer-in-vb-script.aspx]]></link><description><![CDATA[<span class="pBody postableBody">Hi,<br />
<br />
I got same problem as mine from http://www.experts-exchange.com/Programming/Languages/Visual_Basic/Q_10660601.html<br />
<br />
<strong>"I'm trying to change the printer and then print a document using the InternetExplorer (or WebBrowser, whatever works) control.<br />
Is there any way to set the printer before printing with the IE control? &nbsp;Something that sets the printer via the program, not an option window popping up to the user (this program will run on the server side of a client / server app)......................<wbr />..."<br />
<br />
</strong>But didn't get it.......<br />
<br />
I got some below code from online searching.....<br />
<br />
Dim P &nbsp; <br />
For Each P In Printers<br />
&nbsp; &nbsp; If P.DeviceName = "Xerox Color" Then<br />
&nbsp; &nbsp; &nbsp; &nbsp; Set Printer = P<br />
&nbsp; &nbsp; &nbsp; &nbsp; Exit For<br />
&nbsp; &nbsp; End If<br />
Next<br />
<br />
OR<br />
<br />
<br />
Dim objWMIService, objItem, colItems, strComputer<br />
strComputer ="."<br />
Set objWMIService = GetObject("winmgmts:\\" &amp; strComputer &amp; "\root\CIMV2")<br />
Set colItems = objWMIService.ExecQuery("S<wbr />ELECT * FROM Win32_Printer")<br />
<br />
For Each objItem In colItems<br />
If objItem.DeviceName = "Xerox Color" Then<br />
&nbsp; &nbsp; &nbsp; &nbsp; Set Printer = objItem <br />
&nbsp; &nbsp; &nbsp; &nbsp; Exit For<br />
&nbsp; &nbsp; End If<br />
Next<br />
<br />
<strong>Can you please help me?<br />
</strong><br />
<br />
<br />
For your information following is my whole code........<br />
<br />
<p>Option Explicit</p>
<p>Const OLECMDID_PRINT = 6<br />
Const OLECMDEXECOPT_DONTPROMPTUSER = 2<br />
Const PRINT_WAITFORCOMPLETION = 2</p>
<p>Dim oIExplorer <br />
'Dim url</p>
<p >'Dim P <br />
&nbsp;&nbsp;&nbsp; <br />
'For Each P In Printers<br />
'&nbsp;&nbsp;&nbsp; If P.DeviceName = "Xerox Color" Then<br />
'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set Printer = P<br />
'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Exit For<br />
'&nbsp;&nbsp;&nbsp; End If<br />
'Next</p>
<p>Dim objWMIService, objItem, colItems, strComputer</p>
<p>strComputer ="."</p>
<p>Set objWMIService = GetObject("winmgmts:\\" &amp; strComputer &amp; "\root\CIMV2")<br />
Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_Printer")</p>
<p>For Each objItem In colItems<br />
If objItem.DeviceName = "Xerox Color" Then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set Printer = objItem <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Exit For<br />
&nbsp;&nbsp;&nbsp; End If<br />
Next</p>
<p >'If WScript.Arguments.Count &lt; 1 Then&nbsp; <br />
&nbsp; <br />
'WScript.Echo "Required Parameter missing"&nbsp; <br />
'WScript.Quit </p>
<p>'End If&nbsp; <br />
&nbsp; <br />
&nbsp;'Retrieve the first argument (index 0).&nbsp; <br />
&nbsp; <br />
'url = WScript.Arguments(0)&nbsp; </p>
<p>Set oIExplorer = CreateObject("InternetExplorer.Application")<br />
'oIExplorer.Navigate url<br />
oIExplorer.Navigate "http://www.google.com/"</p>
<p>'Remove below line and uncomment all other lines<br />
oIExplorer.visible = true</p>
<p>'oIExplorer.visible = False</p>
<p>Do while oIExplorer.ReadyState &lt;&gt; 4<br />
wscript.sleep 7000<br />
Loop</p>
<p>oIExplorer.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER</p>
<p>While oIExplorer.Busy</p>
<p>Wend</p>
<p>&nbsp;</p>
<br />
<br />
<br />
<br />
Thanks</span>&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10234112/sepcifying-printer-in-vb-script.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:01:23 GMT</pubDate></item><item><title><![CDATA[VB6 with MAPI for Lotus Notes]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10234110/vb6-with-mapi-for-lotus-notes.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10234110/vb6-with-mapi-for-lotus-notes.aspx]]></link><description><![CDATA[<p dir="ltr" style="margin-right: 0px;">Everybody,<br />
<br />
I need to incorporate mail functionality into a VB6 application. The default mail system is Lotus Notes 6.5. I have read that this version of Lotus Notes is MAPI-enabled.<br />
<br />
Here is a weird thing I see. When the user clicks a SendMail button, the below code is launched:<br />
&nbsp;&nbsp;&nbsp; MAPISession1.SignOn<br />
&nbsp;&nbsp;With MAPIMessages1<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .SessionID = MAPISession1.SessionID<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Compose<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .RecipAddress = "John Smith"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .MsgSubject =&nbsp;"Test memo"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .MsgNoteText = "This is testing data!"<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddressResolveUI = True<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .ResolveName<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Send True<br />
&nbsp;&nbsp;&nbsp; End With<br />
<br />
This code opens a window in Lotus Notes (this is what I expected) but<br />
- the To address box contains the recipient address followed by the body text one the first line and the recipient address on the second line:<br />
John SmithThis is testing data!<br />
John Smith<br />
- the Body section is blank.<br />
<br />
Is there anything I can do to fix it or Lotus Notes is incompatible with MAPI.<br />
Thanks,<br />
Lev<br />
<br />
</p>&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10234110/vb6-with-mapi-for-lotus-notes.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:01:23 GMT</pubDate></item><item><title><![CDATA[using webservice in vb 6.0]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10233895/using-webservice-in-vb-60.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10233895/using-webservice-in-vb-60.aspx]]></link><description><![CDATA[<p >Dim clnt As New SoapClient30<br />
Dim strsvc As String<br />
'the client is initialized<br />
clnt.MSSoapInit "http://servername/xml.asmx"</p>
<p>strsvc = clnt.webervermethod<br />
'the result returned from the web service is sent to message box<br />
MsgBox (strsvc)<br />
<br />
i am using the above code<br />
but i am not geeting the .webervermethod name after dot<br />
<br />
&amp; getting error<br />
<br />
</p>&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10233895/using-webservice-in-vb-60.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:01:23 GMT</pubDate></item><item><title><![CDATA[DataReport - place value in label from Recordset]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10232677/datareport--place-value-in-label-from-recordset.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10232677/datareport--place-value-in-label-from-recordset.aspx]]></link><description><![CDATA[I am generating a DataReport without using the Data environment<br />
<br />
It Is&nbsp; A Ledger Of EACH Landlord For Real Estate Agents<br />
<br />
I am Using DataShape to group the Data <br />
<br />
I CAN in the Group Header fill in NAME &amp; Address and OPENING BALANCE<br />
<br />
I can Fill all Fields in the Data Line including Amount&nbsp; ( per Transaction )<br />
<br />
I CAN in the Group Footer useing RptFuncSUM give total of Amount Field from Data Line<br />
<br />
WHAT I CANT DO&nbsp; if&nbsp; find a way of Showing The TOTAL of&nbsp; OPENING BALANCE PLUS or MINUS<br />
Value of RptFuncSum <br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ... This value is know&nbsp; and&nbsp;is &nbsp;included in The Data&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ....&nbsp; can be included either in Parent OR Child Recordset <br />
<br />
I can Not Get a Label to&nbsp; Take&nbsp;&nbsp; .item("LblCfwd").caption = RsParent.Fields(3).value <br />
<br />
I can not use Textbox in Group Footer <br />
<br />
Can You suggest the best method of doing this <br />
<br />
Thanks in Advance <br />
<br />
Peter Wallace&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10232677/datareport--place-value-in-label-from-recordset.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:01:24 GMT</pubDate></item><item><title><![CDATA[Using my own MsgBox rather than standard Excel with SaveAs function]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10231098/using-my-own-msgbox-rather-than-standard-excel-with-saveas-function.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10231098/using-my-own-msgbox-rather-than-standard-excel-with-saveas-function.aspx]]></link><description><![CDATA[<p><span style="font-size: 13px; font-family: verdana;">I have a spreadsheet&nbsp;and I don't want people to be prompted&nbsp;by the standard Excel message when trying to save&nbsp;as read-only. I want my own message to be displayed.<br />
<br />
I have vba in place so that if it is read-only then it's doesn't save or prompt to save when closed and this doesn't bring up the Excel message box.<br />
<br />
What I need is to be able to stop people saving it using the Save or Save As icon's/file menu options. I am aware I could disable these to stop people selecting them in the first place but dont really want to go down this route as user may need to have other spreadsheets open at the same time and I dont want to disable the save options on these aswell. <br />
<br />
The code i have so far is below and it works as desired when Save As is selected, it displays my message box and then cancels the save. But when Save is selected (rather than Save As) it bring up the following prompt, then when i click ok it displays my message box.<br />
<br />
"'copy of Spreadheet1.xls' is read-only. To save a copy, click OK, then give the workbook a new name in the Save As dialog box."<br />
<br />
How can I get it react the same way to the Save request as it does to the Save As. Thanks.</span></p>
<p><span style="font-size: 13px; font-family: verdana;"></span></p>
<p><span style="font-size: 13px; font-family: verdana;">Currently I'm have this code:
<p>&nbsp;</p>
<p></p>
<div class="reCodeBlock" style="overflow-y: auto;border: #7f9db9 0px solid;">
<div class="reCodeBlock" style="overflow-y: auto;border: #7f9db9 0px solid;">
<div style="background-color: #fff;"><span style="margin-left: 0px! important;"><code style="color: #000;">Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)&nbsp; </code></span></div>
<div style="background-color: #fff;"><span><code>&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 15px! important;">&nbsp;</span></span></div>
<div style="background-color: #fff;"><span><code>&nbsp;&nbsp;&nbsp;</code><span style="margin-left: 9px! important;"><code style="color: #000;">If ThisWorkbook.ReadOnly = False Then GoTo Continue&nbsp; </code></span></span></div>
<div style="background-color: #fff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px! important;">&nbsp;</span></span></div>
<div style="background-color: #fff;"><span style="margin-left: 0px! important;"><code style="color: #000;">ReadOnly:&nbsp; </code></span></div>
<div style="background-color: #fff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 6px! important;"><code style="color: #000;">MsgBox "The workbook is read only, changes cannot be saved", vbExclamation, "Attention"&nbsp; </code></span></span></div>
<div style="background-color: #fff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 6px! important;"><code style="color: #000;">Cancel = True&nbsp; </code></span></span></div>
<div style="background-color: #fff;"><span style="margin-left: 0px! important;"><code style="color: #000;">Continue:&nbsp; </code></span></div>
<div style="background-color: #fff;"><span><code>&nbsp;&nbsp;</code><span style="margin-left: 12px! important;">&nbsp;</span></span></div>
<div style="background-color: #fff;"><span style="margin-left: 0px! important;"><code style="color: #000;">End Sub</code></span></div>
</div>
</div>
</span></p>
<div class="reCodeBlock" style="overflow-y: auto;border: #7f9db9 0px solid;"></div>&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10231098/using-my-own-msgbox-rather-than-standard-excel-with-saveas-function.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:01:25 GMT</pubDate></item><item><title><![CDATA[passing parameter from vb to crystal report 8.0]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10225801/passing-parameter-from-vb-to-crystal-report-80.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10225801/passing-parameter-from-vb-to-crystal-report-80.aspx]]></link><description><![CDATA[I've made a crystal report 8.0 from VB 6.0. But when i'll run&nbsp; it give srun time error 201515.When i passing the parameter this error has occured then it shows error like error formula at record selection. the vb code is<br />
<br />
cr.SelectionFormula = "wage.mon = " &amp; Val(Combo1.Text) &amp; ""<br />
<br />
please help to shout out the problem.<br />
<br />
<br />&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10225801/passing-parameter-from-vb-to-crystal-report-80.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:01:31 GMT</pubDate></item><item><title><![CDATA[Perform custom actions or execute file before uninstalling application]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10225453/perform-custom-actions-or-execute-file-before-uninstalling-application.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10225453/perform-custom-actions-or-execute-file-before-uninstalling-application.aspx]]></link><description><![CDATA[I am using Package and Deployment wizard to build setup of my application. When the user uninstalls my product from control panel, I want a file to execute before uninstallation starts. In .net, there are custom actions classes which can perform custom actions before and after uninstallation. Similarly, if I want to perform such custom actions in vb6, what should be done?&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10225453/perform-custom-actions-or-execute-file-before-uninstalling-application.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:01:31 GMT</pubDate></item><item><title><![CDATA[Monitor file creation now working properly in mapped drives,]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10225142/monitor-file-creation-now-working-properly-in-mapped-drives.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10225142/monitor-file-creation-now-working-properly-in-mapped-drives.aspx]]></link><description><![CDATA[Hi,<br />
<br />
Well, I am trying to use WMI service to monitor a file creation in a Mapped shared drive.Its working as expected for local dirves like C: or D:, but its locating the incorrecting file, while mapping the drive to X or Z: to shared network resource in a LAN.<br />
<br />
I am using following code..<br />
<br />
<p>'File Monitor.<br />
Dim objWshNetWork<br />
Set objWshNetWork = CreateObject("WScript.NetWork")</p>
<p>Dim computerName<br />
computerName = objWshNetWork.ComputerName</p>
<p>'Using windows WMI service to monitor the file, basically its used to get the windows resources, this service is part of<br />
'all windows installation, WMI is Window management Instrumentation service.</p>
<p>Dim objWMIService<br />
Set objWMIService = getObject("winmgmts:\\" &amp; computerName &amp; "\root\cimv2")</p>
<p >Dim sDrive, sFolders</p>
<p>sDrive = "Y:"<br />
<br />
'Y is mapped drive name, which points to network resource in LAN.<br />
<br />
sFolders = "Test"</p>
<p>'sDrive = "c:"<br />
'sFolders = "AutomationResults"</p>
<p>Dim objMonitoredEvents<br />
Set objMonitoredEvents = objWMIService.ExecNotificationQuery _<br />
&nbsp;&nbsp;&nbsp; ("SELECT * FROM __InstanceCreationEvent WITHIN 20 WHERE " _<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp; "Targetinstance ISA 'CIM_DirectoryContainsFile' AND " _<br />
&nbsp;&nbsp;&amp; "TargetInstance.GroupComponent= " _<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp; "'Win32_Directory.Name=""" &amp; sDrive &amp; "<a>\\\\</a>" &amp; sFolders &amp; """'")<br />
&nbsp;&nbsp;<br />
Dim objLatestEvent<br />
Do<br />
&nbsp;<br />
&nbsp;Set objLatestEvent = objMonitoredEvents.NextEvent</p>
<p>&nbsp;MsgBox "A file is created"</p>
<p>&nbsp;MsgBox "File Monitoring information" &nbsp;&amp; objLatestEvent.TargetInstance.PartComponent<br />
&nbsp;MsgBox "File Name:-" &nbsp;&nbsp;&nbsp;&amp; objLatestEvent.FileName</p>
<p>&nbsp;MonitorFileCreation = objLatestEvent.TargetInstance.PartComponent</p>
<p>&nbsp;Exit Do<br />
&nbsp;<br />
Loop&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;<br />
Set objWshNetWork &nbsp;&nbsp;= Nothing<br />
Set objMonitoredEvents &nbsp;= Nothing<br />
Set objLatestEvent &nbsp;&nbsp;= Nothing<br />
Set objWMIService &nbsp;&nbsp;= Nothing<br />
<br />
Any help is highly appreciated.<br />
<br />
Thanks.<br />
<br />
</p>&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10225142/monitor-file-creation-now-working-properly-in-mapped-drives.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:01:31 GMT</pubDate></item><item><title><![CDATA[Appropriate use of EnhMetaFileBits ?]]></title><guid isPermaLink="false"><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10222382/appropriate-use-of-enhmetafilebits-.aspx]]></guid><link><![CDATA[http://www.eggheadcafe.com/community/vb6/8/10222382/appropriate-use-of-enhmetafilebits-.aspx]]></link><description><![CDATA[Hi - I need some help. I have a VB programme which opens "read-only" specification documents and determines what different with respect to a previous version. For text that is not such a problem, but to determine whether pictures have changed I decided upon the following process: <br />
- determine the md5 value for a picture&nbsp; and compare it with the previous version.<br />
So my programme browses through the document and once it stumbles upon an inlineshape I determine the md5 value of the EnhMetaFileBits() array. Quite straight forward, right?, using similar code as shown below.<br />
<br />
My problem is: 2 runs of my code using the same (read-only) specification file result in different md5 values. How come?? This is exactly the opposite of what I wanted to achieve.<br />
<br />
I know the md5 algorithm is very edgy to even slight differences, that's exactly why I use it. <br />
And have no reason to doubt the md5 (see http://www.di-mgt.com.au/crypto.html) see below<br />
-So why doesn't it work?<br />
<br />
I assumed the EnhMetaFileBits() do fully represent the picture and nothing more and that the EnhMetaFileBits() do not depend on the spot where it is located in memory (that might differ between different runs of my programme)<br />
-Is that correct?<br />
-Is this inappropriate use of the EnhMetaFileBits?<br />
<br />
==========================================================================<br />
&nbsp;&nbsp; &nbsp;Dim bytescnt As Long<br />
&nbsp;&nbsp; &nbsp;Dim bytes() As Byte<br />
&nbsp;&nbsp; &nbsp;Dim md5val as String<br />
&nbsp;&nbsp; &nbsp;Dim md5val2 as String<br />
<br />
&nbsp;&nbsp; &nbsp;bytescnt = UBound(Selection.EnhMetaFileBits) - _<br />
&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; LBound(Selection.EnhMetaFileBits) + 1<br />
<br />
&nbsp;&nbsp; &nbsp;ReDim bytes(bytescnt)&nbsp;&nbsp;&nbsp;'adapt size of the bytes<br />
<br />
&nbsp;&nbsp; &nbsp;bytes = Selection.EnhMetaFileBits 'copy the picture<br />
<br />
&nbsp;&nbsp; &nbsp;md5val = MD5_bytes(bytes, bytescnt)&nbsp;&nbsp;&nbsp;'determine the picture's md5-value<br />
<br />
==========================================================================<br />
<br />
Tried it directly upon the metafilebit using:<br />
<br />
&nbsp;&nbsp; &nbsp;md5val = MD5_bytes(Selection.EnhMetaFileBits, bytescnt)<br />
<br />
with the same results over 2 separate runs of my programme<br />
<br />
And tried the following as well:<br />
<br />
&nbsp;&nbsp; &nbsp;md5val = MD5_bytes(bytes, bytescnt)&nbsp;&nbsp;&nbsp;'determine the picture's md5-value<br />
&nbsp;&nbsp; &nbsp;md5val2 = MD5_bytes(bytes, bytescnt)&nbsp;&nbsp;&nbsp;'determine the picture's md5-value<br />
&nbsp;&nbsp; &nbsp;If (md5val &lt;&gt; md5val2) then<br />
&nbsp;&nbsp; &nbsp;&nbsp; msgbox<br />
&nbsp;&nbsp; &nbsp;End if<br />
<br />
md5 values were always equal!!<br />
<br />
I debugged quite a lot, I dumped the EnhMetaFileBits to file as a bitmap using a SaveImage() routine I discovered here in another question and viewed them: the pictures look the same, but their md5-hashes differ. <br />
What's causing this???<br />
BTW: Using MS-VB6.3 in MS-Word 2007&nbsp;&nbsp;<a href="http://www.eggheadcafe.com/community/vb6/8/10222382/appropriate-use-of-enhmetafilebits-.aspx" target="_self">read more</a>]]></description><pubDate>Sat, 31 Mar 2012 16:01:41 GMT</pubDate></item></channel></rss>