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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Continuous form and focus on record

Status
Not open for further replies.

TeddyvN

Programmer
Feb 25, 2003
28
NL
Dear all,

I have a database in which a search can be performed. The results of the search are then displayed in a continuous form. Each record in this form has a button next to it on which you click to view the complete record info (in a normal form that opens).

What I would like is that the focus on the button changes the color of the buttonlabel... I mean that when my focus on the continuous form is on record one, that the button displays a red arrow, and when I move the focus to record two, the arrow on record one chenges back to the original blue, and the arrow on record two chenges to red... etc. etc.

Now I noticed that any change on the button affects all records - is there a possibility of a workaround? Or am I asking too much?




Teddy
 
You can ask .. .. ..

But realistically - you need to think about what you're asking to understand WHY it can't be done.

Any UNBOUND object on a continuous form is JUST ONE OBJECT. It appears multiple times on the form ( one on each record row ) but it is still the same object.

The only objects that are uniquely identifiable are the BOUND objects.


SO What you could do is :-
Have a text box control bound to any field in the record and you can change the BackColour ( or any other appropriate property ) of that control, but you cannot do it to unbound controls.



'ope-that-'elps.



G LS
spsinkNOJUNK@yahoo.co.uk
Remove the NOJUNK to use.
 
Thanks LittleSmudge,

I did as advised:
I have a textbox which is bound to a record, but I still struggle with the same issue.
How can I create an event that occurs when the focus is on that articular text field in that particular record?


Teddy
 
Eats humble pie.

Forget that.

What you can do is extract the data from an individual control in a continuous form by the method above - but as you've experienced - and as I've just tried out - it don't work for setting PROPERTIES of the object - evidently because, bound or unbound, they are all still the same one object.







G LS
spsinkNOJUNK@yahoo.co.uk
Remove the NOJUNK to use.
 
Ive got a quesion

Say you had a text box bound to ID, that went:

1, 2, 3, etc.


Then you added an unbound textbox and set it to equal the value of the bound text box. Would this then show the same:

1, 2, 3, etc.

Or would it show:

1, 1, 1, etc.
 
Spinalwiz:

It would show the same data as the bound textbox - the data in the control is evidently not the same as the properties of the control...

What I wanted is to show the focus on the particular records on hte continuous form. I guess I'll have to forget the fancy way and just stick to the "Record Selectors" which show an arro on the focused record... same effect, not nearly as nice.

Thanks for thinking with me LittleSmudge.

Teddy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top