Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I check the value of a bound control after changing the record

Status
Not open for further replies.

nakkii

Programmer
Jul 11, 2002
38
US
I am getting very frustrated with this.

I have a bound control to an ADO Datacontrol, when the user clicks the forward or back button to change to the next/previous record. I want to check the value of the bound control and perform a function based on that value.

The movecomplete event fires before the boundcontrol is updated and adding the line:

chkBound.refresh

to the movecomplete event doesn't do any good either.

What am I missing?
 

>I want to check the value of the bound control and perform a function based on that value

Exactly what are you trying to do?

What operation will the function perform with relation to the current record?
Will it just use the field value for a completely different operation, or will the function have a direct impact on the value of the current field/record, such as a format or validation function?
Should the function be called whether of not the current record has changed, or each and every time the cursor is moved to another record?
[/b][/i][/u]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
 
I am performing a completely different function based on a value in a 1 char field in a SQL table, the values are 1,0 and NULL. Everytime the user goes to a new record I need to look at the value in that field and set the values of some other fields based on that value as well as do some other processing.

What I was trying to do was take three option buttons and have them display the value represented as a an option along with some other functions. I used a bound checkbox to retrieve the value from the recordset and then from there I need to look at the state of the checkbox and set the option buttons accordingly.

What I found out was that I am probably using the wrong control to bind to the data.

In MS's infinite wisdom there is no "change" event for the checkbox like there is for every other kinda of databound control. So I am now using a bound text box and setting the values depending on the value of the text box.

At this point my option buttons are working fine but the other function isn't being performed because when the value of the text box is the same two records in a row the "change" event doesn't fire for the text box.

Any light you can shed on this would be greatly appreciated.

 

I'm on the run for today, but for now:

>there is no "change" event for the checkbox

For a check box, the click event is the Change event as well. If you change the value of the check box in code, the click event will get fired. [/b][/i][/u]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top