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

How to eference single instance of a control on a continous form

Status
Not open for further replies.

Trestkon

Technical User
Apr 2, 2004
26
CA
The subject pretty much says it all. I'm trying to set values for a single instance of a control on a continous form. I'm not entirely sure if there's an easy way to do this, but it's pretty essential to my setup. As it stands now I'm only able to reference *every* instance of a certain control.

Thanks in advance :)
 
How are ya Trestkon . . .

Not trying to sound this way or that, but we are not mind readers ... nor do we have any idea whats in your head or what your looking at. You say:
Trestkon said:
[blue] ... set values for a [purple]single instance[/purple] of a control on a continous form.[/blue]
You need to expand on this.

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
There is no easy way, it is actually impossible. There is only one instance of the control everything else you see is just "paint on the screen".

But likely you can use conditional formatting to manage some aspects of the control "display" for a given record. How about some details?
 
Hmm, conditional formating will likely not work in this case.

I have a continuous form where users enter upcoming years and the total proposed budget for that year (ex: 2010 and $1000). They can then click a "Details" button for that entry and enter a more detailed budget breakdown for that year. If they decide to enter a more detailed budget breakdown, then the total budget on the first form is overwritten with the sum of the detailed budget items on the details page.

What I would like to happen is that when the budget field on the continuous form is updated, it would also be locked so that if more detailed budget info is available we won't have people putting in a total budget number that no longer makes sense. I have the locking code working nicely but of course it locks every instance of the total budget field in the continuous form, which is less than desirable.

I hope that clears it up a bit :)
 
conditional formating will likely not work in this case
Really ?
You may conditionally disable the control ...

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
As stated no one here is a mind reader so how about showing some code. What you are asking can be done using the currentEvent of the form. This fires each time the form changes the selected record. In a continous form I do an if check and lock/unlock the control. It does this for all controls, but changes each time I enter another record. So I am locking all controls, but it appears as if I am only doing it for the selected record.
 
@PHV

Oh, well, that shows what I know :) I'll check it out.

@MajP:

That is indeed a clever way to go about it! I'll play around with it tomorrow when I'm in the office and toss my code up here if I can't get it working the way I want it.

Thanks guys!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top