473,772 Members | 2,349 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Wierd Combo Box Behaviour!

14 New Member
I have created a combo box with the following properties:

RowSourceType: Value List
RowSource: "0%";"10%";"25% ";"36%";"37 %"
Bound to column: 1
Limit to List = Yes
Default Value = None
Format: Percent
Decimal Places: 0
Column Count: 0
Control Source: Discount field in a table.

When i load the form and select a value from the combo box, only "0%" appears. I am able to view all other percentages, but when i select any one of them, only 0% appears. I have no clue why is this happening.

Now, if i change the Bound to Column property to 0, then i am able to select the value normally. So, if i select 10% from the list, 10% appears in the combo box.

I am ok to set the Bound to column property to 0, but the problem comes when i need to calculate the discounted price. I have a function that takes the value from this combo box and then calculates the price.

When the Bound to column property is set to 0, the compiler takes the position of the value in the list. So if i select 10%, the cmbDiscount.val ue displays 2 and not 10%.

I am getting really frustated and don't know what to do. Does anyone has suggestions??
Jul 17 '07 #1
2 1789
nico5038
3,080 Recognized Expert Specialist
I have created a combo box with the following properties:

RowSourceType: Value List
RowSource: "0%";"10%";"25% ";"36%";"37 %"
Bound to column: 1
Limit to List = Yes
Default Value = None
Format: Percent
Decimal Places: 0
Column Count: 0
Control Source: Discount field in a table.

When i load the form and select a value from the combo box, only "0%" appears. I am able to view all other percentages, but when i select any one of them, only 0% appears. I have no clue why is this happening.

Now, if i change the Bound to Column property to 0, then i am able to select the value normally. So, if i select 10% from the list, 10% appears in the combo box.

I am ok to set the Bound to column property to 0, but the problem comes when i need to calculate the discounted price. I have a function that takes the value from this combo box and then calculates the price.

When the Bound to column property is set to 0, the compiler takes the position of the value in the list. So if i select 10%, the cmbDiscount.val ue displays 2 and not 10%.

I am getting really frustated and don't know what to do. Does anyone has suggestions??
Did you try:
RowSource: 0;10;25;36;37

Nic;o)
Jul 18 '07 #2
NeoPa
32,573 Recognized Expert Moderator MVP
Did you try:
RowSource: 0;10;25;36;37

Nic;o)
You specified an array of string items rather than numbers.
You can see them, but they have no numerical value when you try to process them.
Jul 19 '07 #3

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

Similar topics

2
1769
by: givlerj | last post by:
I need some help. Here is a little background, I support a MS Access 2k DB (SQL Server 2k backend) that has courses and students. The problem form lets the user pick a course from a drop down and opens a report of the students attending the course in the dropdown. A user can't view on 1 course in the dropdown list. He can view other courses but not this one. Other users on other computers can view the course just fine. Furthermore, I was...
2
1859
by: Vaddina Prakash Rao | last post by:
Hi all .. I describe here a wierd behaviour .. i dont understand why ... This could be very stupid aswell .. so please bear me .. I have been writing a program to accept multiple parameters and print them out .. similar to printf (please Dont ask me why this, when we already have printf .. Because i have plans add more power to this function). Any way i print the code here,...
14
1568
by: Rowland Shaw | last post by:
I've got a databound combo (databound to a System.Data.DataTable), but some rather unpredicatable behaviour -- even though I have 8 rows in the source table, only the first 6 are showing up in the items collection. I've been scratching my head over this for a while now, but can't fathom what could be to blame for this oddity. Has anyone seen this behaviour before, or can think of any possible causes?
5
1673
by: Johs32 | last post by:
I have the follwing code: #include <stdio.h> #include <stdlib.h> struct data { int *ip; };
0
1603
by: Tom | last post by:
I have some very strange issues with combo boxes on a tab control. Here's the scenario: I have a Windows Forms form that has a tab control on it, with two (2) tabs. Tab 2 happens to have a number of text and combo boxes on it (in panels on the tab). These combos were originally simple drop down lists - i.e. you had to select from the list and couldn't enter anything of your own. At that time everything worked fine. Now, the users...
4
2905
by: virtualgreek | last post by:
Dear All, First of all I would like to take the time to thank you all for your efforts and time spent at this wonderful forum. I have found it very helpful with numerous examples available for every level of user. I am facing a rather weird behaviour with a combo box on a subform (Continuous form). I have two tables. Order and Order_Details. The master form is based on the Orders tables and the details form (subform) is based on the...
2
1479
by: cyberdwarf | last post by:
Hi! I have inherited a continuous form whose detail area contains two combo boxes. The rowsource of the 2nd combo depends on the selection made in the 1st, and is rebuilt in the GotFocus event of the 2nd combo. This all works OK, BUT..... When I click into the 2nd combo, the contents of the 2nd combo of all existing rows on screen disappear, until I click somewhere else on the form, at which point, all "missing" data reappears. Users...
1
1461
by: sierra7 | last post by:
Hi all One of my users is complaining that when she types in a combo box, instead of matching characters and over-typing, she seems to be inserting e.g. On entering the combo she types her first character "a" and the box then displays the first matching item in normal way ="Aluminium Bronze". The RowSource is based on a query. However, she wants to enter "Aluminium Profiles", so as she is a very fast 'typer' she rapidly types "Aluminium...
9
2919
by: prakashwadhwani | last post by:
I have an unbound combo box in the form header. I have used an input mask "CCCC" 40 times to limit the max number of characters to 40. When I tab into the combo box & press a character say "K" for example, the entire first match gets filled in the combo box and the cursor goes to the last character of the combo box. So I can't effectively search for a "KI" until I backspace the entire entry which has got filled in. Once i remove the...
0
10264
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10106
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
10039
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
9914
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8937
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
5355
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
5484
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4009
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
3610
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.