473,804 Members | 3,424 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Formatting more than one field at the same time (and dates as dates)

If I need to format how the content of a field is displayed, I can
click ALT + ENTER from design view, and specify the format, for
example, the number of decimal digits and so on.
Is there a way to apply the same kind of formatting to more than one
field at the same time? I tried selecting multiple fields, but if then
I click ALT + ENTER I don't have the option to choose formatting.

Also, how can I format dates as dates? I have a table with some dates,
that are properly recognized and formatted. I create a summary query
showing the average dates by certain fields. However, the average
appears as a number and I can find no way to format it as a date. The
only solution I could find was to export the table to Excel and format
it as a date there, but it clearly is not an effective solution...

Thank you in advance for your help!

Oct 9 '07 #1
3 2116
A1: There is no problem with selecting several controls at once, and then
setting their Format property in the Properties box.

A2: See:
Calculated fields misinterpreted
at:
http://allenbrowne.com/ser-45.html
The article explains how to use CVDate() around the calculated field so JET
recognises it as a date. If you don't follow how to apply this, post your
SQL statement.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

<my********@goo glemail.comwrot e in message
news:11******** **************@ k79g2000hse.goo glegroups.com.. .
If I need to format how the content of a field is displayed, I can
click ALT + ENTER from design view, and specify the format, for
example, the number of decimal digits and so on.
Is there a way to apply the same kind of formatting to more than one
field at the same time? I tried selecting multiple fields, but if then
I click ALT + ENTER I don't have the option to choose formatting.

Also, how can I format dates as dates? I have a table with some dates,
that are properly recognized and formatted. I create a summary query
showing the average dates by certain fields. However, the average
appears as a number and I can find no way to format it as a date. The
only solution I could find was to export the table to Excel and format
it as a date there, but it clearly is not an effective solution...

Thank you in advance for your help!
Oct 9 '07 #2
On 9 Oct, 15:21, "Allen Browne" <AllenBro...@Se eSig.Invalidwro te:
A1: There is no problem with selecting several controls at once, and then
setting their Format property in the Properties box.
I'm sorry, but I'm a novice to Access and don't quite follow you.
I'd like to format the way Access shows certain fields in tables and
queries (e.g. set the number of decimal digits displayed). To do this,
I open the table/query I want in design view, select a column, click
ALT+ENTER, and choose the format I want from "format" in the property
sheet which appears. However, if I select more than one column and
then click ALT+ENTER, the property sheet which appears is different
and no longer has the "format" option.
I'm sorry if this may seem banal but I really have no clue! Btw, is
that the only way to format a field?
A2: See:
Calculated fields misinterpreted
at:
http://allenbrowne.com/ser-45.html
The article explains how to use CVDate() around the calculated field so JET
recognises it as a date. If you don't follow how to apply this, post your
SQL statement.
It doesn't work :(
The date fields are correctly formatted, recognized and displayed as
dates. However, I need to create another table which summarizes the
average date by type of account; The SQL code is:

SELECT DISTINCTROW [Main - with L8M CashFlows].SegmentDescrip tion,
Avg([Main - with L8M CashFlows].Default_Date) AS AvgOfDefault_Da te
FROM [Main - with L8M CashFlows]
GROUP BY [Main - with L8M CashFlows].SegmentDescrip tion;

The calculations are correct, but I can't format the averages as
dates. I tried with CDate:

SELECT DISTINCTROW [Main - with L8M CashFlows].SegmentDescrip tion,
Avg(CDate([Default_Date])) AS ReformattedDate
FROM [Main - with L8M CashFlows]
GROUP BY [Main - with L8M CashFlows].SegmentDescrip tion;

Thanks!
Oct 9 '07 #3
Ah: you're trying to do that in table design, not form design?

Don't bother. Leave the Format property in the table blank. Instead, create
a form where the data is entered. (You can use Datasheet view if you want it
to look like a table.) In form design view, you can select several controls
at once, and apply a format.

Think of the table as the bucket to hold the data, and the form as the
interface to find/enter/manage the data. Therefore you don't need to format
the data in the table itself. (And there is a bug in Access 2003 SP3 that
doesn't display some data correctly if the table field has a Format
applied.)

BTW, if you have lots of repeating fields (such as Jan, Feb, Mar, ...), you
have a spreasheet type design, not something that is suitable for a
database. You will need to break the table into 2: one for whatever the main
record is, and a related table where you have a *record* for each month's
value.

Did you use Date/Time fields in table design? Or Text fields? If they are
date fields, you will be able to fix the problem as suggested. If you're
still stuck, switch your query to SQL View (View menu in query design), copy
the SQL statement, and post it here.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

<my********@goo glemail.comwrot e in message
news:11******** **************@ 50g2000hsm.goog legroups.com...
On 9 Oct, 15:21, "Allen Browne" <AllenBro...@Se eSig.Invalidwro te:
>A1: There is no problem with selecting several controls at once, and then
setting their Format property in the Properties box.

I'm sorry, but I'm a novice to Access and don't quite follow you.
I'd like to format the way Access shows certain fields in tables and
queries (e.g. set the number of decimal digits displayed). To do this,
I open the table/query I want in design view, select a column, click
ALT+ENTER, and choose the format I want from "format" in the property
sheet which appears. However, if I select more than one column and
then click ALT+ENTER, the property sheet which appears is different
and no longer has the "format" option.
I'm sorry if this may seem banal but I really have no clue! Btw, is
that the only way to format a field?
>A2: See:
Calculated fields misinterpreted
at:
http://allenbrowne.com/ser-45.html
The article explains how to use CVDate() around the calculated field so
JET
recognises it as a date. If you don't follow how to apply this, post your
SQL statement.

It doesn't work :(
The date fields are correctly formatted, recognized and displayed as
dates. However, I need to create another table which summarizes the
average date by type of account; The SQL code is:

SELECT DISTINCTROW [Main - with L8M CashFlows].SegmentDescrip tion,
Avg([Main - with L8M CashFlows].Default_Date) AS AvgOfDefault_Da te
FROM [Main - with L8M CashFlows]
GROUP BY [Main - with L8M CashFlows].SegmentDescrip tion;

The calculations are correct, but I can't format the averages as
dates. I tried with CDate:

SELECT DISTINCTROW [Main - with L8M CashFlows].SegmentDescrip tion,
Avg(CDate([Default_Date])) AS ReformattedDate
FROM [Main - with L8M CashFlows]
GROUP BY [Main - with L8M CashFlows].SegmentDescrip tion;

Thanks!
Oct 9 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
9449
by: Gerrit Holl | last post by:
Posted with permission from the author. I have some comments on this PEP, see the (coming) followup to this message. PEP: 321 Title: Date/Time Parsing and Formatting Version: $Revision: 1.3 $ Last-Modified: $Date: 2003/10/28 19:48:44 $ Author: A.M. Kuchling <amk@amk.ca> Status: Draft Type: Standards Track
3
1595
by: joe ruggeri | last post by:
Hey All ... I'm developing in ASP/VBScript using DreamweaberMX, w/ an Access 2000 DB as the data source. The source of the data is coming from a third party, which I get as a CSV and import into the database, updating it weekly. Since I have no control over how the data is collected, I'm not sure how to fix this problem, but here it is. This is a database of movies and among the many fields I import is one for the
8
3539
by: Mike MacSween | last post by:
tblCourses one to many to tblEvents. A course may have an intro workshop (a type of event), a mid course workshop, a final exam. Or any combination. Or something different in the future. At the moment the printed output is usually going to Word. It's turning into an unholy mess, because I'm having to prepare umpteen different Word templates, and the queries that drive them, depending on what events a course has.
2
1190
by: Sara | last post by:
The problem: Conditional formatting bold, red when field Value < date() sets the field background to white - always - whether condition is met or not. I want the field unfilled and just red/bold when the date has passed. Background: I have 2 related fields that are only rarely active, so I manage them in the query for the subform: ShowBlanket: IIf(,"Blanket","") and
2
1540
by: Thomas Beyerlein | last post by:
I am binding dates to a textbox, the date is stored in SQL in a datetime field. When it gets bound it turns it into a long date (Sunday, Dec. 25 2005), in SQL when viewing the table it views as a shortdate. When inserted to SQL the datetimepicker format for the date is short. I have not had a problem with the formatting of a date to a textbox before, but this time I am using the CurrencyManager to navigate though several records. This is...
2
2412
by: sgtted71 | last post by:
I have searched the Word Help and the Access Help, I have consulted the well used Access Bible that sits behind my desk, and to no avail...so now I consult the mighty brain trust that is "thescripts". I have merged a query with a form in word, mail merge..very simple. However, my fields will not retain the formatting I have so painstakingly created in Access. I lose my dashes in the Social Security number and the medium date formatting in the...
11
6373
by: tlyczko | last post by:
Hello, I'm new to SQL Server, working for a non-profit computerizing a lot of its data. I imported a table of people's names, birth dates, etc. into SS2005 from Access, and the birth_date was imported as an Access date/time field, giving it the datetime datatype in SQL. The column values look like: 10/14/1964 12:00:00 AM
4
3330
by: Jeff Goodman | last post by:
If there is a better newsgroup to post this in, please let me know. I am a relatively new VB.NET/SQL 2000 programmer. I am working with data imported into SQL2K from Access. Many of the dates are null, such as the terminate date with current employees. I have written the search function to find a certain employee, and now I am editing the selected records. Several of the fields are date fields, and I am trying to format them so...
1
2556
by: Greg (codepug | last post by:
Access 2000 Using a textbox of a single form, I created a calculated field. The following code is in the Control Source for this field: =IIf(=24,+(/),/ ) The numbers that are calculated are correct, and is working fine. Using Conditional Formatting for this textbox, I attempt to change the
0
9710
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
9589
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10329
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,...
1
7626
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6858
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
5527
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
5663
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4304
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
3830
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.