473,394 Members | 2,168 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,394 software developers and data experts.

Access 97 Dlookup field formating

2
I have created a P & L Statement which I'm very pleased with after downloading historical data from excel spreadsheets. I've created a successful DLookup function called LYMTD in a select query to callup certain data into a report. The Dlookup function in my query works well but when I try to total the 17 LYMTD amounts in my P & L report using =Sum([LYMTD]) I get a message which says "The microsoft Jet engine can not execute the SQL statement because it contains a field that has an invalid data type". I have done everything to ensure this is not the case. Can anyone make any suggestions as to how I can sort this out?
May 21 '07 #1
2 1893
JConsulting
603 Expert 512MB
I have created a P & L Statement which I'm very pleased with after downloading historical data from excel spreadsheets. I've created a successful DLookup function called LYMTD in a select query to callup certain data into a report. The Dlookup function in my query works well but when I try to total the 17 LYMTD amounts in my P & L report using =Sum([LYMTD]) I get a message which says "The microsoft Jet engine can not execute the SQL statement because it contains a field that has an invalid data type". I have done everything to ensure this is not the case. Can anyone make any suggestions as to how I can sort this out?
try
=Sum(val([LYMTD]))
May 21 '07 #2
KTB
2
try
=Sum(val([LYMTD]))
Thanks for that.
However I found that the following solution works using "CCur":
LYYTD: CCur(DLookUp("[YTD]","[PLTable]","[YTD] =" & [YTD])).
May 21 '07 #3

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

Similar topics

4
by: Bobbak | last post by:
Hello All, I am having trouble with this forum I am developing, I have this form that allows the users to add or modify employee information, and there's a text box called txtEmployeeLogin, and...
2
by: Andrew Stanton | last post by:
Hi, I have a query that returns a sum for all values found that match the criteria. I am wanting to place this value in a textbox on its own so I can refer to it elsewhere. I have used the...
5
by: m_t_hill | last post by:
Running MS Access 2000 MS Windows XP Pro This has caused me a lot of hair loss in the last few days so would appreciate any help. I am running code to append/update a local access database...
2
by: g.ormesher | last post by:
Hi, my primary key is a field called "ind" 'Code Dim varUP as Varient Dim varIND as Interger varIND = Me.ind ' this sets varIND to the index value
1
by: gm | last post by:
Hi; I have written a database that tracks all the installation we have ever done. I have a small heating company. I have recently started keeping a directory of digital photographs of the...
2
by: boyleyc | last post by:
Hi all the following code works perfectly well. Basically it populates a series of check boxes on my form, depending on whether dlookup finds an associated record. The problem i have is that...
4
by: Anja | last post by:
Hi everyone, I am trying to use the expression builder to create input to a control in an Access report. I have a table called Records and I want to select the minimum date for a record where...
4
by: etuncer | last post by:
Hello All, I have Access 2003, and am trying to build a database for my small company. I want to be able to create a word document based on the data entered through a form. the real question is...
6
by: cyndithomas via AccessMonster.com | last post by:
I new to Visual Basic and am struck on a issue. Have created a Login in Screen for Remote User to access and input data. Want the Remote to be able to login & access the Input Form, and Manager...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: 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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.