473,287 Members | 1,659 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

tabcontrol.selectab(tabpage) causes my bound controls to not work correctly.

nev
251 100+
i have a tabcontrol with 2 tabs.
in my datasources pane i have a table with 4 columns -- col1, col2, col3 & col4. now i drag n drop col1 in tab1 & col2 in tab2 as bound textboxes. i place col3 & col4 on my form.

when i run the program, everything's cool. i can navigate the records and all textboxes display the correct data. i click the tabs and everything's fine.

now what i'll do is to programatically display a tab based on the value of col3.

tabcontrol.selecttab(tabpage)

here goes the problem. when i navigate the records, col4 does not display the correct record. sometimes its correct sometimes not. when i comment the code for selecting the tab, everythings cool again. it seems like selecting the tab thru code causes major turbulence in the bindings.

please enlighten me.
Nov 22 '07 #1
2 1529
nev
251 100+
i tried it out again this time i notice that the problem only happens once for the first record i want to display. the next navigations show the correct data.
Nov 22 '07 #2
nev
251 100+
now i get it. when i do this in form load

.selecttab(0)
.selecttab(1)

everything works cool. so what does this mean? what does selecttab do? does it initialize the tab along with the control bindings in it? what is a better way to initialize like the one above. as of the moment the code above is the one i'm using until i get a better solution.

i tried...

1. refresh
2. initializelifetimeservice
3. update

...but these doesn't work.

so does this mean that if i have 5 tabs i'll be doing...

.selecttab(0)
.selecttab(1)
.selecttab(2)
.selecttab(3)
.selecttab(4)

...in my form load painfully?
Nov 22 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Don | last post by:
how do i bring tabpages, which are part of a tabcontrol, to the front on the tabcontrol programmatically. I would like to bring specific tabpages to the front depending on user actions with the user...
5
by: meh | last post by:
New to C#... I have a tab page with a handful of controls on it (label, combobox, etc.). Is it possible to "boilerplate a tabPage with the controls "like a MDI childForm" so that adding a new...
2
by: Ed Debrot | last post by:
I have a tabcontrol that has several attached tabpage's. Not all of the tabpages should be accessible at all times. Ideally I'd like to do one of the following: - hide those tab pages that...
0
by: sbc news groups | last post by:
MSDN has an example of how to create control array on a form....
2
by: Stan Sainte-Rose | last post by:
Hi guys I have a little problem with the tabcontrol. I add and remove tabpage using the following methods : TabControl1.Controls.Add(tabpagex) TabControl1.Controle.Remove(tapagex) But how...
1
by: Maileen | last post by:
Hi, I have a Tabcontrol on my form which display 2 pages (so tabpage1 and 2). I would like to not see these "tabs" (where is written TabPage1 and 2)... for switching from 1 page to the other i...
3
by: Maileen | last post by:
Hi, I used in the past (under VB 6), the tabcontrol and Tabpage. It was really interesting because i was able to hide the tab by themselves and user wasn't able to guess that it was tabcontrol...
4
by: Maileen | last post by:
Hi, Few weeks ago, i asked how to do a tabpage where we don't see the button on the top... in fact, i needed only to show the tabpages without showing the tabpage button (for design purpose) ...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.