1 Replies - 243 Views - Last Post: 22 January 2013 - 11:25 AM Rate Topic: -----

#1 eirik226  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 16
  • Joined: 01-November 12

Record and FikeOpen Question

Posted 22 January 2013 - 10:26 AM

Hello,

I am making a code that is just for a small school project I have. To explain it fast - a user enter some info into textboxes - it gets saved in a file on the computer.

I am using "Records" i believe is the correct word in English and FileOpen.

Now to the question (My program is working fine, just something I want to add)

I have a textbox that shows what Record you are on, or if Record is the wrong word, it shows what info that you have written in, you are on. So you can see the stuff that you have written before in the same textboxes where you write new info that is getting saved to the file.


I am adding to buttons that skips to the last person added and the first person added - and I have NO idea how to do this, I have tried for 1 hour and googled around the problem, but didn't find anything that looked like mine.


Here is one example of my code: (This only skips one and one, and not to the end or the start)

        If position <= number Then
            If position < number Then

            position = position + 1
            End If



            FileGet(Filenumber, Mystudent, position)

            'Transfer the information of the student
            'tp the textboxes on screen.

            txtNavn.Text = Mystudent.name
            txtKlasse.Text = Mystudent.Class
            txtEpost.Text = Mystudent.Email
            txtFødsel.Text = Mystudent.Birthday
        End If
        
        txtshowPostnumber.Text = Position



The last txtshowPostnumber.Text is where I show what "number" you are on.

If you don't understand my problem, just tell me and i'll try to explain further.

Thanks for any help given!

Is This A Good Question/Topic? 0
  • +

Replies To: Record and FikeOpen Question

#2 eirik226  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 16
  • Joined: 01-November 12

Re: Record and FikeOpen Question

Posted 22 January 2013 - 11:25 AM

I found out how to do it - after sitting here 1.5 hours I now feel like an idiot :)

   
If position <= number Then
If position < number Then
	 
	    position = number
	    End If




AND for the opposite


 If position >= 1 Then
            If position > 1 Then


                position = 1
            End If




Anyway, this is resolved, if mod could close it :)

Thanks.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1