473,387 Members | 1,365 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Strange influence of Form Timer event

dima69
181 Expert 100+
I have bumped into a strange Access bug. When inactive form has Timer event set, any RunCommand action, like acCmdCopy, (at another form or table) will fail with an error.

Is anybody familiar with this behavior knows any workaround ?
Dec 21 '06 #1
5 2154
Killer42
8,435 Expert 8TB
I have bumped into a strange Access bug. When inactive form has Timer event set, any RunCommand action, like acCmdCopy, (at another form or table) will fail with an error.

Is anybody familiar with this behavior knows any workaround ?
I'm not familiar with it, but I'm curious about one or two things. Such as, what version of Access? And what specific error is produced?
Dec 22 '06 #2
missinglinq
3,532 Expert 2GB
And exactly what do you mean by "inactive" form?
Dec 22 '06 #3
nico5038
3,080 Expert 2GB
I know the problem and that's why I never use the Timer event in my code.

As far as I've experienced it has to do with (re)setting the focus of form controls and thus causing a different event sequence. There are however sample programs with a hidden form to allow the closure of the opened databases from a distance.

You could check the TOC of the Access Cookbook, especially chapter 10
By following the link "Examples" you can download the sample databases.
http://www.oreilly.com/catalog/accesscook2/

Nic;o)
Dec 22 '06 #4
dima69
181 Expert 100+
This happans with both Access 2000 and 2002. The error is something like "Command FilterBySelection is not available now".
Inactive form - open form which is not active, while another form is also open and active, i.e has the focus.
Nico - you are probably right that this has something to do with focus, but setting the focus to the current form and / or control does not help either. So I'm still looking for the workaround.
Not using Timer event could be a good idea if you can suggest something else with similar functionality :)
Dec 22 '06 #5
nico5038
3,080 Expert 2GB
A workaround is to skip the runcommand.
This statement effectively activates the options of the menubar and when they are greyed out, they won't work.
The best is to handle the manipulations from code.
E.g. for filtering I set the filter like:

me.filter = "[code]=" & me.cmbCode
me.filteron = true

Nic;o)
Dec 22 '06 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: Manuel Lopez | last post by:
I have a puzzling form timer problem that I didn't experience prior to Access 2003 (though I'm not sure access 2003 is to blame). Here's the situation: a computer has two access 2003 databases on...
4
by: Dan | last post by:
Hi, I have a timer on a form (System.Windows.Forms.Timer - Framework 1.1) that is set to 60 seconds as sort an of inactivity monitor. If 60 seconds have elapsed without any user activity I want...
2
by: DenoxiS | last post by:
Hi, I'm having problem with this internet application. It's a simple form with a button and couple text boxes where I can enter parameters like timeout etc. Once I push the button, it starts...
3
by: aprivate | last post by:
Hi I am having some problem with a form timer. I added a progress bar to increment its value and the timer works when I use form1.showdialog() However when I use form1.show, form1.refresh()...
7
by: Chris Thunell | last post by:
Right now I have a vb.net windows form project that does a whole bunch of things on the form.load event. The problem with this is that the user does not see the form until all the those things are...
2
by: Steve Richfie1d | last post by:
In Access 97, in the Form_Current routine of a form, I call another routine that repopulates and recomputes everything. However, a SQL Select statement that I initiate from DAO that refers to a...
12
by: martin1 | last post by:
All, is there window form refresh property? I try to set up window form refresh per minute. Thanks
7
by: Jayyde | last post by:
Is there any way to accomplish this? The forms _Load event fires off several other small ones that I'd like to track time for. I can't get either the Mdi Parent form's timer _Tick event or the...
2
by: Johnny Jörgensen | last post by:
I've got a process I want to run in a thread separate from my main application thread, so I've used a backgroundworker component, and in frmMain.Load I invoke the code using...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.