Enter your email address:

Delivered by FeedBurner



Use your pdf converter to make your pdf files easy! You can now buy software that makes converting pdf to doc possible! Did you know you can even convert pdf to word?
Home Page

Bloglines

1906
CelebrateStadium
2006


OfficeZealot

Scobleizer

TechRepublic

AskWoody

SpyJournal












Subscribe here
Add to 

My Yahoo!
This page is powered by Blogger. Isn't yours?

Host your Web site with PureHost!


eXTReMe Tracker
  Web http://www.klippert.com



  Sunday, October 30, 2011 – Permalink –

Canada/US Postal Codes

Automatic Input masks



If you have a mix of Canadian and US postal codes, you might play with the following code inserted as a Country control "After Update" Event property.

Private Sub Country_AfterUpdate()
Dim strCountry As String
strCountry = Me.Country

Select Case strCountry
Case "Canada"
Me.[PostalCode].InputMask = ">L0L\ 0L0;;_"
Case "USA"
Me.[PostalCode].InputMask = "00000-9999;;_"
Case Else
'If the country is not Canada or USA no input mask will be used
Me.[PostalCode].InputMask = ""
End Select
End Sub


comp.databases.ms-access forum

Working with postal codes in Access

As a rule, if you won't be performing numeric calculations on the data, entries should be stored as text. Social Security numbers, Phone numbers and postal codes should be stored as text.


You can use alphabetic characters in an input mask. For example, one of the sample input masks is >L0L\ 0L0 used to represent a Canadian postal code.

The ">" character in the input mask converts all the characters that follow to uppercase.

The "L" character requires an alpha entry; the "0" (zero) requires a numeric entry.

A "\"character causes the following character to be displayed as a literal character rather than a mask character.

A space appears between the three character pairs.
For example, V5P 2G1 is one valid postal code that the user could enter. The mask would prevent the user from entering two sequential alphabetic characters or numbers.
See:
Trinity University - San Antonio, Texas:
Input mask

Definition characters used to create an input mask
Some validation rules

You can manipulate postal codes in Access by changing the data type, input mask, or format of a postal code field.

Microsoft KB 207829:
ACC2000: How to Manipulate ZIP Codes in Microsoft Access.

Also see:
Postal Codes


See all Topics

Labels: , , , , , ,


<Doug Klippert@ 3:56 AM

Comments: Post a Comment


  Monday, October 24, 2011 – Permalink –

Add a Table

Drag drop trick



While working with a query in Design view, you may find that you need to add a table or query. The "book" way to do it is to click the Show Table toolbar button, drag the appropriate objects from the list, and then close the dialog box.
There is another way to do this.

Drag the table or query object's icon from the Database window/Navigation pane directly to the top half of the query design grid.

You can also use this technique in Access's Relationships window


See all Topics

Labels: , ,


<Doug Klippert@ 3:41 AM

Comments: Post a Comment


  Monday, October 17, 2011 – Permalink –

Week Numbers

Who's counting?


For most purposes, weeks are numbered with Sunday considered the first day of the week. This works most of the time, but it can be a little confusing certain years.

2004 has 53 weeks. January 1 is the only day in the first week of 2005. Week 2 starts on Sunday 1/2/2005.

Chip Pearson is the Date and Time guy:
Week Numbers In Excel

"Under the International Organization for Standardization (ISO) standard 8601, a week always begins on a Monday, and ends on a Sunday. The first week of a year is that week which contains the first Thursday of the year, or, equivalently, contains Jan-4.

While this provides some standardization, it can lead to unexpected results - namely that the first few days of a year may not be in week 1 at all. Instead, they will be in week 52 of the preceding year! For example, the year 2000 began on Saturday. Under the ISO standard, weeks always begin on a Monday. In 2000, the first Thursday was Jan-6, so week 1 begins the preceding Monday, or Jan-3. Therefore, the first two days of 2000, Jan-1 and Jan-2, fall into week 52 of 1999.

An ISO week number may be between 1 and 53. Under the ISO standard, week 1 will always have at least 4 days. If 1-Jan falls on a Friday, Saturday, or Sunday, the first few days of the year are defined as being in the last (52nd or 53rd) week of the previous year.

Unlike absolute week numbers, not every year will have a week 53. For example, the year 2000 does not have a week 53. Week 52 begins on Monday, 25-Dec, and ends on Sunday, 31-Dec. But the year 2004 does have a week 53, from Monday, 27-Dec , through Friday, 31-Dec."

The first week of 2005 should start on January 3. The first and second would be part of week 53 of 2004.

Wikipedia:
Week Dates

If your week starts on a different day, you can use the Analysis ToolPac function:
=WEEKNUM(A1, 2) for a week that starts on Monday, =WEEKNUM(A1) if it starts on Sunday.

Also this from ExcelTip.com:
Weeknumbers using VBA in Microsoft Excel

"The function WEEKNUM() in the Analysis Toolpack addin calculates the correct week number for a given date, if you are in the U.S. The user defined function shown here will calculate the correct week number depending on the national language settings on your computer."

In Access:
DatePart Function

If your work week is always Saturday through Friday then
datepart("ww",[DateField],7,1)

will return 1 for 1/1/2005 through 1/7/2005, 2 for January 8-14/2005, etc.
Otherwise use 1 for Sunday through 7 for Saturday.

The last number sets these parameters:

1, Start with week in which January 1 occurs (default).
2, Start with the first week that has at least four days in the new year.
3, Start with first full week of the year.


See all Topics

Labels: ,


<Doug Klippert@ 3:52 AM

Comments: Post a Comment


  Saturday, October 15, 2011 – Permalink –

Entry Checker

A second chance


Unlike Word or Excel, Access does not warn you when data is changed.
Unless you make a structural or code change, Access thinks you know what you want to know and allows you to enter or change data and the close the application without a squeak.

There is a way around this:


"In Microsoft Office Access 2007, by default, users are not prompted to confirm changes after modifying and saving records on a form. But often you might want to prompt users to confirm their changes before the record is saved.

You can use a BeforeUpdate event procedure to display a confirmation prompt and handle a user's response to either cancel or continue with the save.

This visual how-to topic illustrates how to display a custom dialog box to prompt users to cancel or continue with saving changes to a record.

User Prompts
(with a video)



See all Topics

Labels: , ,


<Doug Klippert@ 3:56 AM

Comments: Post a Comment


  Tuesday, October 11, 2011 – Permalink –

Reminder - Task - Outlook

Sent from Access


"If you have a table that contains a date field, and you want to make sure that something happens on that date, one way is to create an Outlook task with a reminder that will pop up on the specified date; you can even use the Outlook reminder to create an email message that will be sent on the specified date.

This article will show how to create an Outlook task from Access VBA code, and send an email message when the task's reminder fires."

The file is located on Helen Feddema's site.
Access Archon
Scroll down to #126

The zip file contains the WAW article, in Word format, plus the supporting file.

Helen Feddema has been working with Word since v. 1.1, Access since the beta of v. 1.0, and Outlook since the beta of v. 8.0 (that's where Outlook started its version numbering).




See all Topics

Labels: , , ,


<Doug Klippert@ 3:12 AM

Comments: Post a Comment


  Monday, October 10, 2011 – Permalink –

Default Save

Choose your own location



When you choose to save most Office files, the Save dialog box defaults to the Documents or My Documents folder.

(The following directions work in 2007-10, but you need to click on the Office button in the upper left corner of the Window)

Word
you can change the default location by going to Tools>Options. On the "File Locations" tab you can modify the storage location.
Excel
Tools>Options. On the "General" tab change the default location.
PowerPoint
uses Tools>Options and the "Save" tab.
Access
Tools>Options and the "General" tab for Databases and Projects
Publisher
Tools>Options "General".
Outlook
will make you take an underground tour into the Registry to change the location to save e-mail attachments.
FrontPage/Expression Web
appears to require the same sort of spelunking.


Change the folder where e-mail messages and attachments are saved

Also:
D.C. Everest school district Weston, WI:
Office Default Paths

If you don't want to change the default, but would like to be able to quickly go to an alternate site, open the Save or Save Attachment dialog box. On the left side of the box is the Places Navigation bar. If you click the Desktop icon, that location will be used to save the file.

You can add spots to the bar. Browse to the specific folder. Highlight the folder and click the down arrow beside the Tools option. Select "Add to My Places."

The file or e-mail attachment can then be saved where you want.




See all Topics

Labels: , ,


<Doug Klippert@ 3:29 AM

Comments: Post a Comment


  Wednesday, October 05, 2011 – Permalink –

Form and Data

Good combo


In Access, tables can be a bother to use for data entry.

Constructing a Form can make it easier.

Here is an MS demo about combining the two:


"While working with forms, a split form can be a very useful view because you simultaneously get two views of the form that are connected to the same data source.
This demo shows you how to create a split form view where you can use the datasheet part of the form to quickly locate a record and the form portion to view or modify the record.

You will also learn how to enhance and customize a split form view to suit your needs."




Form and data






See all Topics

Labels: , , , ,


<Doug Klippert@ 3:32 AM

Comments: Post a Comment