how to shorten my expression in expression builder

anski

Registered User.
Local time
Today, 15:40
Joined
Sep 5, 2009
Messages
93
the expression builder's limit is only 255 characters. i am using a macro to set the value of a field of a table (together with an IIF condition). access uses the full syntax name of a field that is on a subform. i already used the "alias" function in the property sheet of the subform to give the subform and the field concerned shorter names but my expression is still more than 255 characters. is there a way for me to set an alias to the full syntax name of a field using the expression builder or in the macro builder, something that is similar to making an SQL statement using AS? i am not a programmer so i don't know VBA. thanks in advance
 
You are a programmer. It is time to learn VBA.:D
This monster probably needs to be written as a function.

Post more about your database structure and the expression and we may be able to help you.
Often giant expressions can be avoided by restructuring the tables and this solves a lot of other problems before you encounter them.
 
i am an accountant and i try very hard to understand the VBA syntax. it makes me dizzy:D so to be on the safe side, i either use macro builder or expression builder.

i dont have the database with me right now but i know what i want to happen. this is the expression in plain english: (i am using the setvalue in macro)

iif ([actualout] - [shouldbeout]) > 0 AND [actualout] not between 10pm and 6am), [actualout] - [shouldbeout], 0)

it's very simple. but access uses the FULL SYNTAX NAME of the fields. is there a way i can use the "AS" function that i often find in SQL statements to fit the 255 limit of the expression builder? please help:confused:
 

Users who are viewing this thread

Back
Top Bottom