3 Replies - 943 Views - Last Post: 01 May 2013 - 06:56 AM Rate Topic: -----

#1 pc20912  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 58
  • Joined: 14-April 13

VB.Net - Tab Page

Posted 27 April 2013 - 06:52 AM

Sir,

My Access DataBase has few Rows under single person. Some Person's row count is 1, but another person's row count more than 1.
I want create Tab Pages to insert that person's details.
When Creating Tab Pages,
1. Tab Page count must be equal to Row Count. (If that person has 04 rows - 04 tab pages must be created.)

2. Separate MS-Access DataBase row data(Column) put in to that one tab Pages

If click 1st Tab Page : -----> 1st Rows of that Person Details (Field Data / Column) should be there with TextBoxes or Labels

If Click 4th Tab Page : ------> 4th Row of that Person Details (Field Data / Column) should be there with TextBoxes or Labels.

I already done tab Pages creation according to row count with this code, Its with attachment,
Here is the code for Tab Page creations
Dim newPage As New TabPage()
    Dim RecCount As Integer

    While QReaderQ.Read()
    RecCount = RecCount + 1 ' Count How many Rows
    End While

    TabControl1.TabPages.Clear()

    For xXx = RecCount To 1 Step -1 ' to Desending Order ---->3,2,1
    newPage = New TabPage   'create new instance
    If xXx = 1 Then
    newPage.Text = "Repeat - 1"

    Else
    newPage.Text = "Repeat - " & xXx.ToString
    End If
    TabControl1.TabPages.Add(newPage)
    Next



I want put Details from Database to Tab Pages.
Example :
1st time repeat data to 1st Tab Page (repeat Data mean DataBase Column)
4th time repeat data to 4th Tab Page (repeat Data mean DataBase Column)

Please Help to do this, My English not good.
I am not asking about full code, but explain me How to do this with simple code example ?

Attached image(s)

  • Attached Image


Is This A Good Question/Topic? 0
  • +

Replies To: VB.Net - Tab Page

#2 pc20912  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 58
  • Joined: 14-April 13

Re: VB.Net - Tab Page

Posted 28 April 2013 - 05:18 AM

Please anybody help me to do this,

Now I attached my Database and Sample Tab Pages picture for your convenience.

This is My Access Data Base. There are 2 Tables. One for Master Details other for Repeat Details.

According to my example Kevin has come 03 time repeatly. because of that we must create 03 tab pages.


My Question is

When Click (or Load Tab Page) any Tab Page, it must show other details with textbox on the tab page like my attachment.

Please show how to do this, I am beginner because please show simple sample code also.

Attached image(s)

  • Attached Image
  • Attached Image

Was This Post Helpful? 0
  • +
  • -

#3 pc20912  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 58
  • Joined: 14-April 13

Re: VB.Net - Tab Page

Posted 01 May 2013 - 12:34 AM

My Database - MS-Access

I want to retrieve their "visits" from the database and display the details of each visit in a separate tab page in the Tab control.

Now I created Tab pages and Text Boxes in the Tab Pages according to No of visit times.

Here the Code for Create Tab Pages and Textboxes inside the Tab Pages

            Dim RecCount As Integer = 0
            While QReaderQ.Read()
                RecCount = RecCount + 1 ' Count How many Rows
            End While
            
            TabControl1.TabPages.Clear()

            For I = 1 To RecCount
                Dim NewPage As New TabPage("Repeat " + I.ToString)
                For J = 1 To RecCount
                    Dim TB As New TextBox
                    Dim TBA As New TextBox
                    TB.Name = "Textbox - TB " + I.ToString + "-" + J.ToString
                    TBA.Name = "Textbox - TBA " + I.ToString + "-" + J.ToString
                    
                    TB.Location = New Point(60, 40)
                    TBA.Location = New Point(300, 40)
                                     
                    NewPage.Controls.Add(TB)
                    NewPage.Controls.Add(TBA)
                Next
                NewPage.Name = NewPage.Text
                TabControl1.TabPages.Add(NewPage)
            Next
            TabControl1.Refresh()


Here is the sample picture for My requirement,
According to it, Kevin repeat 03 Times, and
02nd Tab Pages show his 02nd time visit Details.

How I do this, ?

Attached image(s)

  • Attached Image
  • Attached Image

Was This Post Helpful? 0
  • +
  • -

#4 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9208
  • View blog
  • Posts: 34,589
  • Joined: 12-June 08

Re: VB.Net - Tab Page

Posted 01 May 2013 - 06:56 AM

Do not create duplicate topics. Merging.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1