Using Round Function (1 Viewer)

Fasopus

Registered User.
Local time
Today, 05:29
Joined
Jun 9, 2010
Messages
58
I don't know what I'm doing wrong or if I'm having a total brain fart here (hey it is friday) but I'm trying to apply the round function to a field in one of my reports. So I go into the control source of the field and when I change it to Round ([SOURCE],0) it asks for a parameter, if I build it through the expression builder the field just reads #error. I've checked datatypes and made sure that the round function works in the same place with a number instead of the source so I know that thats not the problem. So how do you go about rounding this way?
 

boblarson

Smeghead
Local time
Today, 02:29
Joined
Jan 12, 2001
Messages
32,059
Is [Source] a field name in your recordsource for the report? It needs to be included in order to reference. (Also Source is an Access Reserved Word and should not be used for a name of a field or object. See here for a complete list of reserved words.)
 
Last edited:

Fasopus

Registered User.
Local time
Today, 05:29
Joined
Jun 9, 2010
Messages
58
No the field is not named [Source] it is named [Logged], just didnt want to window back to check the name when I was typing my question
 

boblarson

Smeghead
Local time
Today, 02:29
Joined
Jan 12, 2001
Messages
32,059
Make sure that the control is not named the same as the field (so if you have the field named LOGGED make sure the control that is showing that is not named LOGGED but something like txtLOGGED and then in your control source you reference the FIELD name and not the control name.
 

Fasopus

Registered User.
Local time
Today, 05:29
Joined
Jun 9, 2010
Messages
58
Yup that did it, thanks Bob, guess I should be more careful with my naming next time around
 

boblarson

Smeghead
Local time
Today, 02:29
Joined
Jan 12, 2001
Messages
32,059
You just have to remember that if you are going to be using any formulas with things, the controls and fields need to be named differently or else it makes Access wacky. :D
 

Users who are viewing this thread

Top Bottom