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

Access 97, runtime error 5

I am using Access 97 on a Win XP platform. The following code is attached to the On Entry event. I have tried this in Access 2003 and it works but not in 97

Private Sub s_addcomments_Enter()
Dim varAA As String
varAA = Format(Now(), "dd mmm yyyy at hh:mm:ss AMPM")
Debug.Print varAA
End Sub

If I comment out the Format line there is no error. I do not understand this.

Thanks.
Dec 31 '06 #1
3 2132
NeoPa
32,556 Expert Mod 16PB
You could try replacing the line with :
Expand|Select|Wrap|Line Numbers
  1. varAA = Format(Now(), "dd mmm yyyy at hh:nn:ss AMPM")
BTW It may also be worth renaming your String field (varAA) as strAA. Misleading prefixes are likely to cause you problems ;)
Dec 31 '06 #2
You could try replacing the line with :
Expand|Select|Wrap|Line Numbers
  1. varAA = Format(Now(), "dd mmm yyyy at hh:nn:ss AMPM")
BTW It may also be worth renaming your String field (varAA) as strAA. Misleading prefixes are likely to cause you problems ;)
Thanks for pointing out the str. Coming from the main frame, var notation was for variable(my usage). I changed your notation for time format from hh:nn:ss to hh:mm:ss. I still get the runtime error -- "Invalid procedure call or argument". I cannot see the error.
Checked some other examples but the light still has not gone on.

Appreciate your comments and assistance.
Jan 1 '07 #3
NeoPa
32,556 Expert Mod 16PB
Hard to say as I don't have Access97 here atm.
Try :
Expand|Select|Wrap|Line Numbers
  1. Format(Now(), "dd mmm yyyy \a\t hh:nn:ss AMPM")
just on the off-chance.
BTW var... generally refers to Variant data-type in VB/VBA rather than variable.
Jan 1 '07 #4

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

Similar topics

12
by: Phil Powell | last post by:
<cfquery name="getAll" datasource="#request.dsn#"> SELECT U.userID, U.fname, U.lname, U.phone, U.lastLoggedIn, U.choiceId, U.experience, T.label AS teamLabel, R.label AS roleLabel FROM User U...
5
by: Nathan Bloom | last post by:
Hi, I have a secured database that runs fine on the computer the database is installed on. I have several workstations with access runtime installed that also need access to the database. ...
49
by: Yannick Turgeon | last post by:
Hello, We are in the process of examining our current main application. We have to do some major changes and, in the process, are questionning/validating the use of MS Access as front-end. The...
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
4
by: Aliza Klein | last post by:
Apologies in advance as I am SURE this has been asked 100 times - but I haven't got a simple answer: I have MS Office XP Developer and have created an installation package (with the runtime) for...
0
by: Yelena Varshal via AccessMonster.com | last post by:
Hello We have a shortcut for our MS ACCESS application that uses a /Runtime switch because we may have some users that use Runtime. The application worked fine in Access 2000 and was tested with...
1
by: rickcross | last post by:
I am trying to use the Access 2007 runtime. I have a program that is fully working in 2007 but when I install the runtime version with same Operating system and Access 2003 installed I have...
0
by: Sebastian | last post by:
Hello I develop my applications in Access 2002. My development system is running Windows XP SP2 and I have Microsoft Office XP Developer. Microsoft Office XP is at SP3. I used Inno Setup (great...
1
by: BL3WC | last post by:
Hi, I'd created a MDE under Access 2003. It is now under testing stage. Some of the users will use Access 2003 runtime and some will use Access 2007 runtime to run this MDE. I installed the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.