473,236 Members | 1,332 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,236 software developers and data experts.

ComboBox Columns & Blanks

37 32bit
A ComboBox with five columns, three of them are numeric in a Table. The ComboBox shows the Columns as numeric (1,200.00), but when the TextBox shows the value, it drops the coma (1200) and the decimal. Do care about the decimal because in the table the numbers are formatted as a numeric whole numbers.

The problem I'm having is trying to get the coma to appear when it should (1,200) it does appear in the column. I have tried to format the values in the Combobox Row Source Select statement like this,
Expand|Select|Wrap|Line Numbers
  1. Format(tAmmo.GrossQty, "#,###") AS ["GrossQty"], Format([tAmmo].[TargetLevel], "#,###") AS ["TargetLevel"] 
and it does add the coma, but then it creates another problem and that is when a zero value should show the textbox is blank and the my calculation get all missed up because it's blank. It even changes the zero value to a blank when looking at columns on the ComboBox.

Everything works like it should until a textbox gets a blank instead of a zero. I've spent two days on this and now I need some help.

How do I force a zero when the column forces a blank, all this because I placed a numeric format in the select statement?
Sep 16 '22 #1

✓ answered by NeoPa

Hi Curious.

Your format strings ("#,###") all say "Give me a string with commas where necessary (>3 digits) but don't show columns unless they, or something to the left, is >0. Oh, and by the way, don't show decimals either.".

If you want zero values to show as 0 then use "#,##0", and if you also want two decimal places to be included regardless then use "#,##0.00".

3 9961
NeoPa
32,554 Expert Mod 16PB
Hi Curious.

Your format strings ("#,###") all say "Give me a string with commas where necessary (>3 digits) but don't show columns unless they, or something to the left, is >0. Oh, and by the way, don't show decimals either.".

If you want zero values to show as 0 then use "#,##0", and if you also want two decimal places to be included regardless then use "#,##0.00".
Sep 17 '22 #2
Curious27
37 32bit
Hi, how are you?

I was so close and yet so far way, all because of a zero.
Makes sense though, how can you plea for a zero if you don't ask for one.

Thanks again, my friend.
Sep 17 '22 #3
NeoPa
32,554 Expert Mod 16PB
Hi Curious.

I'm good thanks :-)

It looks like you're learning as you go, which is progress. All progress is good. One tip I would give you, is to see if the Help page can tell you what you need to know first. It's what I use, even now, in many scenarios.

Sometimes it's hard even to know which one to look at. In this case you probably didn't even appreciate it was a number formatting problem until later, but once you do then a look at the Help page often helps solidify the understanding - as well as often giving extra information about something you might never otherwise have guessed.
Sep 17 '22 #4

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

Similar topics

3
by: JAdrianB | last post by:
I'm trying to use a datagrid for data entry. I've created a couple of combo box columns using information from http://64.78.52.104/FAQ/WinForms/FAQ_c44c.asp#q480q That example basically sets...
0
by: Rudolph Araujo | last post by:
Hi, I needed to build a data grid in which the first column has hyperlinks rather than simple text. I found the following code on this newsgroup and it works fine except for one problem. When I...
1
by: fiaolle | last post by:
Hi I have a DataGrid with ComboBox columns. I want the same thing to happen as when a user clicks and chooses an item in the ComboBox. When a user stands in the last row (new row) and clicks for...
3
by: =?Utf-8?B?TTFpUw==?= | last post by:
I have a GridView control with a template column that I use to display my record data. I’ve included an EditItemTemplate with textboxes bound to the GridView for editing. On my SqlDataSource I...
4
by: =?Utf-8?B?Q2hyaXM=?= | last post by:
I am trying to populate a DataGridView Combobox column with a different data binding source (dataset) depending upon a selection made in a previous column. I can handle the previous column but how...
1
by: alexmax2003 | last post by:
That quotation was add b4 i need to know from VB.Net wizards The answer "I'm trying to use a datagrid for data entry. I've created a couple of combo box columns using information from...
1
by: leiger | last post by:
Hi, I need help with this problem as soon as possible (within a couple of days). This is the first time I have ever used Access 2007 and therefore I am having some problems - especially as I...
0
by: arunpandey | last post by:
Friends I am creating columns and edit button in ASP.NET DataGrid at Run Time but when I click on the Edit Button disappears all columns and edit button itself. Only one column remains stay back,...
0
by: Curious27 | last post by:
Back again... I'm trying to calculate two TextBoxes which contain a values from a ComboBox Columns. TextBox1 - txtQty (Control Source: equals .(3) TextBox2 - txtPicked (Control Source:...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
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: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, youll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
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
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.