refresh properties in form control when underlying field is changed

  • Thread starter Thread starter Meryl
  • Start date Start date
M

Meryl

There have been several instances when I have had to
change the properties of a field in a table. The
properties of that field in a linked form are not
automatically reflected.

I have to delete the control and then reinsert it into
the form to take effect. Is there an easier way to do
this?

Thanks.
Meryl
 
If you can see a "field" in a form, then you are looking at a text box or
some other control. The ControlSource property determines which field it is
bound to, but the other properties (such as Visible, BackColor) are
properties of the form on the control. Therefore another control on another
form has different properties, even if bound to the same field.

If you are talking about the value of the field in the control, you could
use the AfterUpdate event of this form to Refresh or Requery the other one.
However, you could run into concurrency problems if both forms are dirty at
once, or there are memo fields here.
 
I guess I'm not being clear. This has nothing to do with
the field value.

Let's say I have an address field in a table that is 30
characters in length. I want to expand that to 100
characters. I change it in the table and save.

The form that has the control "address" which is bound to
that field will still only let me enter 50 characters. I
have to delete that control and re-insert it in order to
have the updated property reflected.

Is there another way to have this property updated
automatically in the form without having to go through
these laborious steps? Or is there a short-cut at least?

Thank you.
Meryl
 
Thanks for the example, but I cannot follow it.

If I try to open Table1 to change the FieldSize while the form is open, I
receive a message that I cannot modify the table while the data is in use.
 
I am definitely not being clear. I close the form. I
change the field in the table. When I re-open the form,
the new properties of the control have not taken effect.
It seems to me it should have, but it doesn't.

The only way around this is that I have to delete the
control from the form and then insert it again. Only
then, do the new properties exist for that control in
that form.

Meryl
 
Meryl, I cannot reproduce that here.

In fact, the text box on a form has no property that looks anything like a
FieldSize. Simply changing the FieldSize property in the table is all that
is necessary to make the text box receive the larger number of characters in
a bound form.
 
Allen,

The correct example is field value in a lookup where the
lookup is a value list. When I add another value, it
doesn't appear in my control's list of values on the
form, however, it does appear when I look at the raw
table data in datasheet view.

Interesting that the field size example doesn't have the
same difficulties. I naturally assumed it would.

Meryl
 
A list box or combo that has a Value List as its RowSource type is not
getting values from a table.

Sorry, Meryl, I am not able to help you further, as I can't make sense of
your examples.
 
Back
Top