473,397 Members | 1,949 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,397 software developers and data experts.

Button highlight

158 100+
Hey guy,

I have a series of buttons that I use to set filters on a schedule form: Past, Today, tomorrow, This Week, This month and All.

I don't have problem with the filters, it's the button itself that gives me trouble. When I press the button in the best of time it becomes highlighted signifying that this is the last button I pressed.

Funny thing is when I press let's say Tomorrow button, the Today button get highlighted, but it doesn't affect the filter, I wonder why that is?

I use access 2007 with the preset theme Office for my form.
I have copied and pasted all my buttons from the same one and changed the name and code for each and they all work fine. It just bug me that the highlight feature of the button doesn't highlight the right button when it is pressed.

Any ideas?
Feb 9 '10 #1
4 5265
nico5038
3,080 Expert 2GB
Guess you use a SetFocus command referring to the wrong button name.
But would be better to have the code to see what happens.

Nic;o)
Feb 9 '10 #2
jaad
158 100+
No it set on Click.
Expand|Select|Wrap|Line Numbers
  1. Private Sub FilterTodayCmd_Click()
  2.     Me.Filter = "(Year(ProjectScheduleT.DateStart)=Year(Date()) And Month(ProjectScheduleT.DateStart)=Month(Date()) And Day(ProjectScheduleT.DateStart)=Day(Date()))"
  3.     Me.FilterOn = True
  4.  
  5. End Sub
This is an example of the filter codes all set on Click event.
Feb 9 '10 #3
nico5038
3,080 Expert 2GB
Hmm, that doesn't cause the effect.
Can you attach a zipped .mdb with a sample form with the buttons showing this behavior ?

Nic;o)
Feb 9 '10 #4
jaad
158 100+
I figured it out...
I added a line at the end of my code
Expand|Select|Wrap|Line Numbers
  1. FilterTodayCmd.SetFocus
Feb 10 '10 #5

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

Similar topics

13
by: David Morgan | last post by:
Hello I have a little function to highlight text if it exists. Function Highlight(vFind, vSearch) Dim RegEx Set RegEx = New RegExp RegEx.Pattern = vFind RegEx.IgnoreCase = True Highlight =...
6
by: Skip Hollowell | last post by:
I am working on a menu bar for a site, and am using buttons in the bar (because the customer wants to use accessKeys for each selection, apparently it is too much work to click on them with a...
0
by: jbbs | last post by:
I have a question regarding on the button and label. i don't know why when the mouse cursor points on the button, i see the button is flirking. is there anyway to make it not behave like that?...
4
by: melanieab | last post by:
Hi, I'm trying to find the command(s) that will force buttons to be highlighted any time they're in focus. At the moment, buttons are only sometimes highlighted, and you can't always tell where...
5
by: Atara | last post by:
I am trying to convert the following code to VB .Net, I still have some gaps (the lines that are marked with (*)) and also I need an ending condition for the while loop. any help would be...
1
by: melanieab | last post by:
Hi, From reading something months ago, I've been under the impression that saying button1.Focus() is enough to focus on the button and highlight it (the dotted box). If this is true, I don't know...
8
by: Jay | last post by:
I'm having a problem using lambda to use a command with an argument for a button in Tkinter. buttons = range(5) for x in xrange(5): buttons = Button(frame, text=str(x+1), command=lambda:...
2
by: russiandevil | last post by:
hi, Does anyone have an idea on how I'd go about highlighting (with a border, or something equally effective) a input button of type 'image' (i.e. <input type=image alt=Login src=http://<etc,...
0
Merlin1857
by: Merlin1857 | last post by:
A thing I have been asked for on a number of occasions is the ability to highlight text after its been searched for in a record return page. The following does this perfectly. Use this function...
21
by: AdamOnAccess | last post by:
I am trying to set the focus on a button that sits on page 1 of my tab control. It looks like I'm successful at setting the focus because I see the highlight on the button, but when I push the...
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: 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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.