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

Display formats ignored/overridden

1,271 Expert 1GB
I have observed a number of instances where it seems display format specifications I set in design mode are ignored at runtime. For instance, a form I'm currently working shows a number of dates in text boxes. I specify format of mm/dd/yy, but what I see at runtime is mm/dd/yyyy.

I've got a report that I specified a format of #,###;#,###;~ but what displays is a number with 2 decimal places.

Now I have many, many examples where I get what I expect to see. What am I missing here?

Jim
Nov 17 '15 #1
9 1122
zmbd
5,501 Expert Mod 4TB
Where are you setting the format?
Nov 17 '15 #2
NeoPa
32,556 Expert Mod 16PB
4-digit date format in Options?

It can be set globally or by database.
Nov 17 '15 #3
jimatqsi
1,271 Expert 1GB
I'm setting the format in the properties of the text box in each case. If it was a global setting I would expect to see the problem in every instance, but that is not what is happening.
Nov 17 '15 #4
zmbd
5,501 Expert Mod 4TB
Does this happen on multiple PC's?
The reason I ask is that regional settings in the OS can play with how things are displayed.
Nov 17 '15 #5
jimatqsi
1,271 Expert 1GB
I haven't checked it yet on any machine but the one I develop on. I'll take a look at some others today.
Nov 17 '15 #6
NeoPa
32,556 Expert Mod 16PB
JimatQSI:
If it was a global setting I would expect to see the problem in every instance, but that is not what is happening.
It's not necessarily global. That's one of the possible options. Did you check the setting?
Nov 18 '15 #7
jimatqsi
1,271 Expert 1GB
I checked the 4-digit year date setting in Access options and it is not selected. Not for the particular database and not globally.

I was able to solve the problem with the decimal places showing in spite of my formatting in design mode. The reason for that problem was that the data was coming from a view in SQL and the data for those total columns (sums) was being return as strings. I'm not sure why that is, but changing the view to cast the data as integers solved the problem.

Jim
Nov 19 '15 #8
zmbd
5,501 Expert Mod 4TB
coming from a view in SQL
That would have been good to know. I had assumed the data was in a Access database.

I have seen this before from other servers. We have a MySQL server that I pull data from into either Access or Excel and quite often data types will come thru as string-cast instead of Date or Numeric... To the point now that I've code that walks thru the records and explicitly sets the field/column to the correct typecast.
Nov 19 '15 #9
NeoPa
32,556 Expert Mod 16PB
Thanks Jim. Answer very clear now.

As for stuff coming from SQL Server, that's a whole different ballgame. It will depend on the types of the fields included - whether from the tables or calculated - and also on the driver being used. If any data comes across via the driver as a type that Access can't recognise immediately then it's likely to be converted implicitly to some other type. Most frequently String.

As ZMBD says, this is really a detail that should have been included in the OP. There again, I'm guessing if that were as obvious to you before as it was to us, then you would have done so without further prompting. We all live and learn.
Nov 19 '15 #10

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

Similar topics

18
by: David Morris | last post by:
G'day. Is there a known "display:block;" problem in opera? In playing around trying to get some cross browser conformance, I either inadvertently or redundantly (depending on your perspective)...
6
by: orahm | last post by:
I have started an earlier thread about this topic. I got some good info but I'm still confused. I'm trying to add a complex number object that contains a real and a imaninary double to a listbox....
8
by: Christopher Kurtis Koeber | last post by:
Dear All, Recently I created a thread about trying to load a particular ICON image that GDI plus could not load. I realized that GDI plus definitely does not support it because it had a certain...
10
by: Xah Lee | last post by:
there's a HTML odditity. That is, line break will be ignored inside <preif the adjacent lines are tags. see the source code and description here: http://xahlee.org/js/linebreak_after_tag.html...
3
by: Peter Webb | last post by:
When I started my current extremely graphics intensive project, I ignored advice in this ng to use the Paint method, and used the alternate CreateGraphics approach. I thought there were some good...
7
by: olseni | last post by:
Hi all I hope someone can help me with this. I am sure there is a solution, but I cannot seem to find it.... I need to make a report with the following format: In the columns I have 5 samples,...
6
by: wink | last post by:
I'd like to determine if a method has been overridden as was asked here: http://www.velocityreviews.com/forums/t564224-determining-whether-a-derived-class-overrides-a-virtual-memberfunction.html...
1
by: nsphelt | last post by:
I am wondering if it is possible to access the underlying property of a base class within a derived that has overridden that property. I am using VB.NET and when I use the MyBase keyword to access...
6
by: Peter | last post by:
Hi I have an "Address" object, which has properties for a person's lastname, firstname, street name, house number, house letter etc. I need to display the data from this address object in...
0
by: Bassem | last post by:
Hello, I want to customize the the MapType control so that displays only two formats (default four formats Map, Terrain, Satellite, and Hybrid). I want to display only specific formats from them....
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
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...
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)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.