Prev: Calculate the number of work days between two dates with specific days off
Next: Lookup table problem
From: Banana on 17 Apr 2010 18:25 On 4/17/10 6:59 AM, Tomahawk Lady wrote: > So, my question: Should I change all the Requery commands to > RunCommand/Refresh? > > Nance With knowing a bit more, I'll have to answer in general terms. Refresh and Requery are quite distinct and should be used appropriately. I use Refresh when I want to check for any values that may have changed. I use Requery when I want to check for any new records that may have been added and rows that may have been removed. Refresh is cheaper than Requery. Requery has a side effect of changing the form's record selector back to the first record - it's as if you close & re-open the form and lost the place. Refresh doesn't do that but you won't be able to tell if someone else added a new record or not you can only be sure you have the latest values for records you already can see. They are different for a reason and thus should be used accordingly.
From: David W. Fenton on 18 Apr 2010 16:38 Salad <salad(a)oilandvinegar.com> wrote in news:vpedncb9UbIzuFfWnZ2dnUVZ_g6snZ2d(a)earthlink.com: > David W. Fenton wrote: >> In short, my bet is that the problem is related to the way macros >> interact with the UI, and that if you were doing it all in VBA, >> you wouldn't have the problem. That would explain why nobody has >> experienced the problem, since most of the people offering help >> in the Access newsgroups graduated from using macros a long time >> ago. >> > But it seems those that are macro gurus will have a heads-up with > A2010. Not so much, seems to me, since the macros are pretty much completely different, and their utility comes entirely from the massive enhancements to macros that were not present in previous versions of Access. -- David W. Fenton http://www.dfenton.com/ usenet at dfenton dot com http://www.dfenton.com/DFA/
From: David W. Fenton on 18 Apr 2010 16:42 Banana <Banana(a)Republic.com> wrote in news:4BCA348B.4070507(a)Republic.com: > Now with 2010, I can see some use in using macros for simple tasks > and for data macros & web databases (where there's no choice > anyway) and I'm quite glad they enhanced the macro language - it's > not full bodied as VBA and I will continue to write more VBA than > macros but it's improvement nonetheless. My concern with macros, even in their new guise, is managing them. In VBA you can easily tell what's in use and what's not, because it's compiled. That is, you can rename a function/sub, hit the compile button and immediately know if it's redundant code that can be removed. With macros, you can't do that. Secondly, unless I haven't heard about it, there's no way to browse through and search all macros and see what's interconnected. Embedded macros were introduced in A2007 and they make it even harder, in my opinion, to tell where things are happening. So, troubleshooting seems to me like it would be very difficult. Also, the main way I make my living is taking over old apps that need revival, and very often this means figuring out a tangle of spaghetti macros and rationalizing it into something more manageable. If there has been no improvement in the tools for maintaining and auditing macros, I, too, will avoid them for anything where they are not essential (just like I do already). -- David W. Fenton http://www.dfenton.com/ usenet at dfenton dot com http://www.dfenton.com/DFA/
From: Tomahawk Lady on 19 Apr 2010 07:56 > Refresh and Requery are quite distinct and should be used appropriately. Banana, As I played around, I seemed to discover that Refresh only works with bound objects, while Requery works with unbound. Is that correct? Nance
From: David W. Fenton on 19 Apr 2010 13:36 Tomahawk Lady <nancycmarshall(a)verizon.net> wrote in news:710b673e-810b-4680-aaff-b8c37b3b1b8f(a)x12g2000yqx.googlegroups.co m: > Banana, As I played around, I seemed to discover that Refresh only > works with bound objects, while Requery works with unbound. Is > that correct? Have you read the help file on the two? Refresh goes back to the database and checks to see if there have been any changes to the currently displayed data and REFRESHES it. Requery completely reloads the data set from scratch, which will eliminate any deletions and pick up any new records. It will also, incidentally, show any updates to any of the other records. It's really not a confusing distinction if you just bother to try to understand it. -- David W. Fenton http://www.dfenton.com/ usenet at dfenton dot com http://www.dfenton.com/DFA/
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 Prev: Calculate the number of work days between two dates with specific days off Next: Lookup table problem |