We help IT Professionals succeed at work.
Get Started

"Format(Date)" command in a form function crashes access on SOME workstations; not others

Chi Is Current
Last Modified: 2008-02-01
Hello ~

The "Format(Date)" command in a form function - to insert the date in an email message below - crashes Access (Microsoft Access has encountered a problem and needs to close, yada yada yada.....) on SOME workstations and not others!?   All workstations are running WXP, Outlook 2003, Access 2000 - SP-3.  And all workstations have the same libraries referenced.

When I remove the "Format(Date)" command it runs fine.

I'm stumped.  Can someone explain why this code runs on only some installations?

Many Thanks, Jacob

    Dim objMailItem As Outlook.MailItem
    Dim olkApp As Outlook.Application
    Dim olkNameSpace As NameSpace
    Set olkApp = New Outlook.Application
    Set olkNameSpace = olkApp.GetNamespace("MAPI")
    Set objMailItem = olkApp.CreateItem(olMailItem)

    With objMailItem
  .To = Forms!frmOrders!frmCountReq!contEmail
       Select Case Frame71.Value
     Case 1    '      Letter #1
  .HTMLBody = "<HTML><FONT SIZE=2>" & Format(Date) & " <BR><BR>>>For fastest response...........
Watch Question
This problem has been solved!
Unlock 1 Answer and 6 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE