Link to home
Start Free TrialLog in
Avatar of Dileepdhananjayaratanayake
Dileepdhananjayaratanayake

asked on

How to choose the files I want


I made a program which recordes entries and displays the stuff that I entered earlier and it saves in a file that I specified.
And I made a check box to tick so it will also display on the screen later.
I want to filter the records as checked and not checked. The 'unchecked' stuff saves as "0" and checked
ones save as "1". If i can filter the 0s and 1s then i think it would be easy.

I want to view the checked and unchecked both seperatly.
This is the code I used to view all the records.

 Dim strName As String
  Dim intGrade As Integer
  Dim strText1 As String
  Dim strText2 As String
  Dim splitText() As String

  Open "C:\Program Files\Tax Pending\tax.txp" For Input As #1
     Do Until EOF(1)
          Input #1, strText2 'read entire line
        splitText = Split(strText2, Chr(44)) 'split line by " ' "

        strName = splitText(0)
         'splittext is string, convert it to int
        strText1 = splitText(0)

        Form2.Print strName, intGrade, strText1
     Loop
  Close #1

Its like displaying all of them. I told the program to save the 0s and 1s but didn't tell it to display. I hope u got my question.
  check box name is chkCheckBox1.
Avatar of StonedRaider
StonedRaider

i dont understand your question quite good but here
Form2.Print strName, intGrade, strText1
your telling it to display it
yes, the

Form2.Print strName, intGrade, strText1

is telling it to display in Form2.  I don't quite understand what you are trying to do either.  It sounds like you have a simply solvable problem, but I don't think you've explained it well enough.
make like this:

take the separated numbers and put them into an if/else check or select case.
I hope you used indexnumbers for your checkboxes else you have to write the code each time.
ASKER CERTIFIED SOLUTION
Avatar of JoaTex
JoaTex

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Dileepdhananjayaratanayake:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
Avatar of DanRollins
Moderator, my recommended disposition is:

    Accept JoaTex's comment(s) as an answer.

DanRollins -- EE database cleanup volunteer