J
Jeff
I wrote some codes to help count the amount of each item sold within a period
of time, I use the following codes in my MDB and it works well
intItemAS = DCount("[ItemName]", "tblSale", "[ItemName] = 'ItemA' And [Size]
= 'S' And [SoldDate] Between '" & Me![StartDate] & "' And '" & Me![EndDate] &
"'")
intItemAL = DCount("[ItemName]", "tblSale", "[ItemName] = 'ItemA' And [Size]
= 'L' And [SoldDate] Between '" & Me![StartDate] & "' And '" & Me![EndDate] &
"'")
intItemBS = DCount("[ItemName]", "tblSale", "[ItemName] = 'ItemB' And [Size]
= 'S' And [SoldDate] Between '" & Me![StartDate] & "' And '" & Me![EndDate] &
"'")
…………………………….
Now, I have upsized my MDB to ADP using SQLserver 2000 as my database. The
codes still work in ADP, but I'd like to make it work faster. What I am
thinking is that I can build an in-line function to fetch the record set
within a set period of time first then let Dcount count the items in this
record set (in-line function). I tried but I can not get the first part work,
i.e. I don't know how to execute the in-line function first. Can anyone help
me with this? Thank you.
of time, I use the following codes in my MDB and it works well
intItemAS = DCount("[ItemName]", "tblSale", "[ItemName] = 'ItemA' And [Size]
= 'S' And [SoldDate] Between '" & Me![StartDate] & "' And '" & Me![EndDate] &
"'")
intItemAL = DCount("[ItemName]", "tblSale", "[ItemName] = 'ItemA' And [Size]
= 'L' And [SoldDate] Between '" & Me![StartDate] & "' And '" & Me![EndDate] &
"'")
intItemBS = DCount("[ItemName]", "tblSale", "[ItemName] = 'ItemB' And [Size]
= 'S' And [SoldDate] Between '" & Me![StartDate] & "' And '" & Me![EndDate] &
"'")
…………………………….
Now, I have upsized my MDB to ADP using SQLserver 2000 as my database. The
codes still work in ADP, but I'd like to make it work faster. What I am
thinking is that I can build an in-line function to fetch the record set
within a set period of time first then let Dcount count the items in this
record set (in-line function). I tried but I can not get the first part work,
i.e. I don't know how to execute the in-line function first. Can anyone help
me with this? Thank you.