473,669 Members | 2,514 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Set the combobox default in tab control

547 Contributor
I manage to get my code working on the main form when i add a combobox to it, but it is does not set the default value in a tab control for the same combobox, based on a filtered query. I would like to display the combobox on the Tab control by the name of Reports.
main form : orderf
combobox name: subdistrict11
query name: qrysubdistrict
i use form load
Expand|Select|Wrap|Line Numbers
  1. Me.subdistrict11 = Me.subdistrict11.Column(1, 0)
Any suggestions please?
Mar 11 '13 #1
2 1596
Seth Schrock
2,965 Recognized Expert Specialist
I'm a little confused by the question. Tab controls don't affect controls like subforms in that you don't have to reference the control through the tabs reference. So are the two combo boxes you mention on the same form or on different forms? If on the same form, they would have to have different names even if they have the same control source. However, your code is basically making the combo box equal to itself. If the combo boxes are on different forms, then you would need the fully qualified reference for the control that isn't on the current form.
Mar 11 '13 #2
neelsfer
547 Contributor
Thx for the quick response. I tested the same combobox on both the main and tab control, at different times, to establish what was wrong on the tabbed control part of the form.
I just discovered a silly mistake i made. The bound column in the combobox was set wrong. It is working now. Perhaps somebody else may require this code one day.
Mar 11 '13 #3

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

Similar topics

1
2188
by: Julie Barnet | last post by:
I need to have a combobox functionality (ie. be able to type and/or select from list). I'm using the combobox control from metabuilders.com. For the most part, this control does exactly what I want it to do. One flaw: when i set the autopostback to true, it seems to have no effect on the control. I have a selectedindexchanged event handler that is suppose to fire when the index of the user control changes. It is only fired when the...
7
23527
by: NCrum | last post by:
I want to set the Default value of a Combobox for any changeable record and have got this working but it is totaly unsatisfactory see the code below I loop through the items in the Combo looking for a match between cVal and the selectedValue then stop when I do have a match the obvious problem is that each iteration fires the selectedIndexChanged but also for a large list this will slow everything down. There must be a better way int...
0
992
by: Rene | last post by:
For fun, I am developing a combobox control look-alike. The only way that I was able to accomplish creating a dropdown list was to basically show up a form right underneath my custom combobox that acts as the dropdown. This form does not have any borders on it and it only hosts a list box control so it looks like a real dropdown.
2
1456
by: chris in grimsby | last post by:
I have a combobox of dropdownlist style as one of the controls on a tabbed form. The list is populated by setting the DataSource property to a dataset and then the DisplayMember and ValueMember properties are set to the names of 2 of the fields in the dataset. I noticed that when the form displays, the combobox defaults to the first item in the list, not to blank (selectedindex=-1) as I would have expected. I can use the...
4
14173
by: Ben Coats | last post by:
Hey, I'm trying to find code for an Explorer-style Directory ComboBox. (You know, it display "Desktop", "My Computer", all drives, etc., but it has a treeview control inside the combobox so that you can navigate through the file system as well.) I've found some on the web, but all of them just have the drives and desktop directories and are static in that you cannot expand the directories. I normally build a treeview control to do it with,...
0
1703
by: yalanue | last post by:
I want to create a combobox with its displaymember populated from a datatable. But once I get it run, the default display member in the combobox is always the first row of the displaymember list. even if I abitrarily set the combobox text to empty string, the value retrieved from the combobox text is still the first row value from the list. How can I set, when I display this combobox, the default display text to be empty, instead of the...
1
24909
by: andrewbda | last post by:
I have a combo box in a subform that will have different options depending on values in the main form. I would like the combo box to default to the first value in the list. Any help would be much appreciated, thanks.
1
2135
by: =?Utf-8?B?bWljaGFlbCBzb3JlbnM=?= | last post by:
I want to create a customized ComboBox where the methods ComboBox.Items.Add and ComboBox.Items.Insert will behave thusly: -- If the item is not present, add it. -- If the item is present, set the selected index to the item (without adding a duplicate). I know the basics of inheriting from user controls, so if this was merely overriding a method of ComboBox I could do it. I also know how to do this with a couple lines of code in my main...
0
1504
by: Andrus | last post by:
I use DataGridView containing DataGridViewComboBoxColumn column. Combobox column displays dropdown list opening selection triangle in all rows. This covers part of visible data if columns are narrow. How to force dropdown list opening control to appear only in active (current) row ? Andrus.
0
1278
by: piercy | last post by:
Hi, Im tyring to display a dataGridView with comboBoxes on about 5 of the fields. This table is basically permissions to certain parts of my program. In the database i just store a 1 or a 0 (access or no access). Now obviously to the user i want this to be displayed as text. Now currently i am creating the columns manually and using the cell changed event to do the updating. This is quite long winded and if possible i would like a simpler...
0
8466
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8810
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8590
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7410
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5683
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4208
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4387
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2798
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1790
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.