Dommain Aggregate and ADP

C

Chris Strug

Am I right in thinking that that Domain Aggregate functions such as DLOOKUP
and DSUM don't work in an Access ADP?

They don't seem to - I just wanted to confirm it.

Assuming that they don't are there any efficient replacements available?
Either with-in Access or as custom functions?

Thanks

Chris Strug
 
G

Guy Horton

Chris,

Do you have any fields that are not updateable by the form (calculated or
display only (enable no/locked yes)), but you are setting default values
for?

Cheers
Guy
 
L

Lyle Fairfield

I have to say that after a little investigation they seem to work on
some occaisons and on others I get a "OLE error". I can't seem to spot a
pattern, its probably just in how I'm using them...

Could we see the code?

When the functions fail, are the connection and user the same as when they
succeed?

CurrentProject.Connection.Execute("SELECT SUM(fldSchoolEnrolment) FROM
tblSchoolEnrolments WHERE fldSchoolID = 107").Fields(0).Value

is an sloppy but quick alternative to DSum that I sumtimes use , but like
anything else that queries an SQL-Database (including DSum I expect) the user
must have the proper permissions in order to have it perform correctly.

If I were doing DSums from an ADP, (and I never use domain-aggregate
functions), I would create a Stored Procedure that returned the value I want,
send it the parameters thet determined the records to be polled and wrap it
within some (probably generic-general type) function. By doing so I think I
could exercise more control over permissions, and find errors more easily.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top