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

Setting value of an unbound variable in continuous forms

Status
Not open for further replies.

JimGawn

Programmer
Apr 13, 2001
2
US
I have:

Table1:
PK - Primary Key
FK - a code field
OS - Other stuff
Table2:
FK - Primary Key of this table, Foreign Key to Table1
D - Description of the code in FK

I have a form, frmTable1, for viewing and editing Table 1, in continuous forms mode. I want to show on each instance of frmTable1:
PK FK D OS
That is, while looking at and editing the Table1 records, the user should be able to view the description for code FK.

So, I created an unbound textbox for D, and a query to look up the value. The query is triggered on frmTable1.Current and frmTable1.FK.Change.

BUT...when I move the returned value to frmTable1.D, D changes to this value on ALL visible instances of the form. Obviously, it should be different on different instances.

I would prefer not to have to resort to a single textbox to display the description for the _current_ instance of the form: it's better if the user can see descriptions for all visible records simultaneously.

How do I achieve this?

TIA.
 
I do not think there is a way out. If you change an unbound control of a coutinuous form, the change is shown on every instance.

Maybe you have to change the unbound control to a bound control.

Seaport
 
The way your relationship is currently defined you can only have one table2 record for each table1 record. So why not simply move the description to table1? If you don't want to do this just add table2 and the decscription field to the form's underlying query. It will then be available for binding to your control. If you don't want your users editing this field make sure you set it's enabled property to no and locked property to yes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top