View Full Version : How to simplify this expression in a query?


dudezzz
10-13-2005, 08:47 AM
I have a form field whose value is as follows:

=Nz(DSum("Capital","Capital_Act","DatePart('q', CVDate([Capital_Month] & ' 1')) = 1 And [projectid]=" & "'" & [projectid] & "'"),0)

Since I am using Domain lookup function in this field, it takes considerable time for this field to get populated on the form when I move from one record to another.

Can anyone tell me the syntax for me to move this expression inside the Form's Query so this can execute faster?

Please note that I need this query to be updateable as I have some other form fields that needs to be edited.

Thanks!

Pat Hartman
10-13-2005, 08:46 PM
Using a domain function in a query is far worse than using one on a form. Some time ago, someone posted substitute domain functions that performed considerably better than the built in ones. Try searching for that post.