Prev: Calculate the number of work days between two dates with specific days off
Next: Lookup table problem
From: Tomahawk Lady on 17 Apr 2010 09:59 A few months ago, I posted a message about an Apply Filter error message that only appeared on 2 of 20 or so computers using a program I developed. None of you had any suggestions although Marco tried to help. I finally go my hands on one of those computers and quickly determined that the problem was the use of Requery. I changed that to RunCommand/ Refresh and the macro ran perfectly. So, my question: Should I change all the Requery commands to RunCommand/Refresh? Nance
From: Salad on 17 Apr 2010 13:13 Tomahawk Lady wrote: > A few months ago, I posted a message about an Apply Filter error > message that only appeared on 2 of 20 or so computers using a program > I developed. None of you had any suggestions although Marco tried to > help. > > I finally go my hands on one of those computers and quickly determined > that the problem was the use of Requery. I changed that to RunCommand/ > Refresh and the macro ran perfectly. > > So, my question: Should I change all the Requery commands to > RunCommand/Refresh? > > Nance I went to Google and searched for access refresh vs requery and there's enough hits to fill you in. As to answering your question, my feeling is don't fix what isn't broken. Regarding your previous post...not everyone has gotten the error you have received. I never have. One has to hope others have experienced something similar. Sometimes it helps if you produced the code to let others review. For example, copy/paste all the code events for the textboxes that were creating the error; Textbox1 and Textbox2. You can also convert a macro to VB as well. Seeing the code will help oftentimes. Look for "Convert Macros To Visual Basic" in Access help. I doubt it makes a difference but who knows, you might have set AllowFilter to false under the form's data tab in properties inadventently. Or the combobox's recordsource get's filter isn't getting updated. I would think its probably in your form's or textboxes update or OnCurrent events that's causing the issue. That's my throw mud at the wall at hope something sticks answer.
From: David W. Fenton on 17 Apr 2010 17:06 Tomahawk Lady <nancycmarshall(a)verizon.net> wrote in news:1945108f-d7d5-41d8-85f9-b491631f1d1c(a)s9g2000yqa.googlegroups.com : > I finally go my hands on one of those computers and quickly > determined that the problem was the use of Requery. I changed > that to RunCommand/ Refresh and the macro ran perfectly. > > So, my question: Should I change all the Requery commands to > RunCommand/Refresh? Most of us with extensive Access experience don't use macros. And I don't use DoCmd.RunCommand for anything that has a direct VBA command. 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. -- David W. Fenton http://www.dfenton.com/ usenet at dfenton dot com http://www.dfenton.com/DFA/
From: Salad on 17 Apr 2010 17:18 David W. Fenton wrote: > Tomahawk Lady <nancycmarshall(a)verizon.net> wrote in > news:1945108f-d7d5-41d8-85f9-b491631f1d1c(a)s9g2000yqa.googlegroups.com > : > > >>I finally go my hands on one of those computers and quickly >>determined that the problem was the use of Requery. I changed >>that to RunCommand/ Refresh and the macro ran perfectly. >> >>So, my question: Should I change all the Requery commands to >>RunCommand/Refresh? > > > Most of us with extensive Access experience don't use macros. And I > don't use DoCmd.RunCommand for anything that has a direct VBA > command. > > 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.
From: Banana on 17 Apr 2010 18:22 On 4/17/10 2:18 PM, Salad wrote: > But it seems those that are macro gurus will have a heads-up with A2010. I dunno. For starters, macro designer was completely revamped in 2010. It functions almost like writing code but with much more stronger intellisense so it actually requires less keystrokes to write macros than the equivalent VBA code to do something. Once you become familiar with list of macros (which isn't too hard to do) it's quite easy to pick up on it. The "macro gurus" will have to learn the new designer as well and possibly may have un-learning to do as the new macro designer also introduces If/Then, SubMacros and error handling. In my case, I ran away from macros after I managed to corrupt a database after deleting a macro when I was a noob fumbling the way around Access. For all I know, the corruption may have been my fault, but I remember that I couldn't actually delete macro - it wouldn't go away so I went and learned VBA and never looked back. 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.
|
Next
|
Last
Pages: 1 2 3 Prev: Calculate the number of work days between two dates with specific days off Next: Lookup table problem |