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

Toggle buttons to display an "X" if the item is selected

I am runing this function to toggle buttens to display an "X" when they
is selected, the butten is linked to a yes/no field. This function
works good, the problem I am having is that when I make a new record
the "X" from the last record I looked at are still there, but the
bottens are not selected nether should they be. How do I clear every
thing when creating a new record?
Any help would be apprecated.

Clarence Wollman
Function CheckClick() As Integer
'This function is used by Toggle buttons to display an "X" if the item
is selected.
If Screen.ActiveControl.Value = False Then
Screen.ActiveControl.Caption = ""
If Screen.ActiveControl.Value = True Then
Screen.ActiveControl.Caption = "X" 'Chr(252)
End Function

Jun 21 '06 #1
4 1979

cwoll wrote:
I am runing this function to toggle buttens to display an "X" when they
is selected, the butten is linked to a yes/no field. This function
works good, the problem I am having is that when I make a new record
the "X" from the last record I looked at are still there,


Is the field in question is not bound to the form's recordsource, then
it won't automatically become blank/null. You'll have to set that
yourself in code.

Me.Controls("MyControl").Value=Null

Jun 22 '06 #2
How would be the best way to do this with about 50 controls without
haveing a lot of redundent code?
Thank you
CW
pietlin...@hotmail.com wrote:
cwoll wrote:
I am runing this function to toggle buttens to display an "X" when they
is selected, the butten is linked to a yes/no field. This function
works good, the problem I am having is that when I make a new record
the "X" from the last record I looked at are still there,


Is the field in question is not bound to the form's recordsource, then
it won't automatically become blank/null. You'll have to set that
yourself in code.

Me.Controls("MyControl").Value=Null


Jun 22 '06 #3

pietlin...@hotmail.com wrote:
cwoll wrote:
I am runing this function to toggle buttens to display an "X" when they
is selected, the butten is linked to a yes/no field. This function
works good, the problem I am having is that when I make a new record
the "X" from the last record I looked at are still there,


Is the field in question is not bound to the form's recordsource, then
it won't automatically become blank/null. You'll have to set that
yourself in code.

Me.Controls("MyControl").Value=Null


sorry, would have helped had I mentioned that you should do that in the
OnCurrent or AfterInsert event of the form... In your case,
After_Insert sounds more likely.

Jun 22 '06 #4
This thread is descibing exectly the problem that I am having, but they
did not come up
with an answer.
Thanks

http://groups.google.com/group/micro...a99c7a72089199

Jun 22 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

40
by: Greg G | last post by:
http://risky-biz.com/new/risky.html I finally got DSL service recently, but I haven't forgotten the agony of waiting for the 64th image to load before I can see ANYTHING on a page. So I will...
3
by: Castal | last post by:
hello, i am trying to learn javascript. i found an example of an menu, but there is one thing i do not understand. in the source it says: ' if(thisMenu.display == "block"){......' i do...
2
by: NTE | last post by:
Access 2000 and 2003. I have made a custom toolbar to allow users to filter by form, etc. The only things I want to appear on that toolbar are the 3 buttons to control filtering. At the right...
1
by: Nathan Sokalski | last post by:
When testing a form of mine which uses RequiredFieldValidators that have the Display property set to "Dynamic" the ErrorMessage property is automatically removed when an entry is completely typed...
1
by: Kim | last post by:
How can I display "No data found" in the repeater if there are no records found after selecting an item from a dropdown list. Another question is: Can repeater perform paging as in datagrid if...
11
by: Ron L | last post by:
I have a barcode scanner which uses a "keyboard wedge" program so that the data it scans comes through as if it was typed on a keyboard. I am trying to have the data in the barcode be displayed in...
1
by: Benny Ng | last post by:
Dear All, Now I met one problem in the development of my one application. I have one ASP.NET page. It's for disply the information of customer. But now I have one new requirement. It's to...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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.