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



  Tuesday, January 25, 2011 – Permalink –

Access Field Highlighting

More code


This technique can also be applied to controls like option groups.

Instead of using OnGotFocus and OnLostFocus events you must use the OnEnter and OnExit events.

In addition, the control group's BackStyle property must be set to Normal to take advantage of the Windows color scheme:

Function Highlight(Stat As String) As Integer
Dim ctrl As Control
On Error Resume Next
Set ctrl = Screen.ActiveControl
If Stat = "GotFocus" Then
ctrl.BackColor = vbHighlight
ctrl.ForeColor = vbHighlightText
ElseIf Stat = "LostFocus" Then
ctrl.BackColor = vbWindowBackground
ctrl.ForeColor = vbWindowText
End If
End Function

Take advantage of global constants. Just add the following two statements to a module:

Global Const Orange = 39423
Global Const LightBlue = 16776960

Then, set the OnGotFocus and OnLostFocus events for the controls in the following format:
Private Sub controlName_GotFocus()
controlname.BackColor = Orange
End Sub
Private Sub controlName_LostFocus()
controlname.BackColor = LightBlue
End Sub





See all Topics

Labels: , , , , ,


<Doug Klippert@ 3:42 AM

Comments: Post a Comment


  Tuesday, January 18, 2011 – Permalink –

Slashed Zero

Oh!

ø

There is a discussion of the slashed zero at:
How to Insert a Slashed Zero (0 Overlaid with a /) - 211315

You can also download the Monaco font that has a slashed ø
(Monaco is an embeddable font)

Andale.ttf (Mono) has a dotted 0

Seagullscientific.com has a font called Crystal

Windows has a free font editor. Type eudcedit on the Start>Run line.
Vic Laurie has a description of the Private Character Editor- Eudcedit

You could also use the EQ field to create a strike through and assign it to an AutoCorrect entry.

{EQ \o (0,/)}

The easiest is, probably Alt+0216 or Alt+0248 It's a Latin "oh" with stroke, but it looks close.

The HTML character code is &oslash; ø






See all Topics

Labels: , ,


<Doug Klippert@ 3:35 AM

Comments: Post a Comment


  Monday, January 17, 2011 – Permalink –

Zeros — Before and After

Nothing's a problem



"When you import data into Microsoft Access, trailing zeros may be lost. This will happen when you import data that is formatted to show these zeros, but where the zeros are not actually part of the data.
For example, in a Microsoft Excel workbook, you can format the number 1234 so that it will be displayed as 1234.000. When you import this workbook into a Microsoft Access table, the number will be displayed as 1234.
This article shows you how to preserve trailing zeros when you import data into Microsoft Access."


How to Preserve Trailing Zeros When Importing Data
Also:
Word — Decimal Point or Trailing Zeros Missing When You Merge Microsoft Access Database

Excel — Using a Custom Number Format to Display Leading Zeros




See all Topics

Labels: , , ,


<Doug Klippert@ 3:40 AM

Comments: Post a Comment


  Monday, January 10, 2011 – Permalink –

Ripple the Ribbon

Change the look


"Learn how you can create a custom Office Fluent Ribbon for an Access 2007-10 database by using only Office Fluent extensibility markup XML and macros.

Discover how to create a command space without writing any code and also learn about more advanced scenarios that require code."

Customizing the Office Fluent User Interface



Customize the Ribbon





See all Topics

Labels: , , ,


<Doug Klippert@ 3:10 AM

Comments: Post a Comment


  Tuesday, January 04, 2011 – Permalink –

Highlight the Current Control

Code vs. property


Many users have trouble knowing which text box on a form they're currently working with. One way to make it clear for users is to highlight the current one, for example, with a yellow background.

Access allows you to do this with conditional formatting, but you can also get a similar result using code.


To do so, create a new module and add the following code:

Function Highlight(Stat As String) As Integer
Dim ctrl As Control
On Error Resume Next
Set ctrl = Screen.ActiveControl
If Stat = "GotFocus" Then
ctrl.BackColor = 65535
ElseIf Stat = "LostFocus" Then
ctrl.BackColor = 16777215
End If
End Function


Save and close the module, then open the form you want to apply the highlighting to in Design view.

Click the Code button and insert

Highlight("GotFocus")

in each textbox control's GotFocus event procedure. Likewise, add
Highlight("LostFocus")

to each textbox's LostFocus event procedure.

When you've finished,save the changes, close the VBE, and switch to Form view.


When you tab to a field, it's shaded yellow. When you tab away from the field, its background is restored to white.




See all Topics

Labels: , , , ,


<Doug Klippert@ 3:35 AM

Comments: Post a Comment