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

Problems with the refresh on subforms

Status
Not open for further replies.

eNautilus

Programmer
May 8, 2003
5
CA
Hello,

I'm new on this, so sorry if I get the wrong thread or something like that.

I have a problem with the refresh of subforms in VBA (W2k SP3 and Access 2k). We have 5 forms (well, infact we have 35 forms and 120 modules...) which works properly "alone": the program does what we want, the label's caption refresh ok, and progress bars works properly.

The problem: we have a new form with 5 buttons and a subform. We want to load a form (from the 5 above) into the subform clicking the right button. The form loads ok, the program does what we want but (and, finally, here's the problem) the subform doesn't refresh captions and progress bars.

And curiously (almost for us) this works ok if we click the button for second time.

Well, we put lines like [form_name].Refresh, [form_name].Repaint, DoEvents (with the names of the father-form -I think this is called MDI-, names of son-forms,...) just follows the lines which manage the captions and progress bars (label_name.Caption= "NEW DATA", for example, follows with [form_name].repaint) but this doesn't works at all.

Could anybody help me? Is this the right way to get help?

Thanks for your answers.

 
have you tried adding ....

[form_name].Requery
 
Yes, but it doesn't work

I'm trying with [form_name].subform.Form.Repaint but an error appears: something like the object doesn't exists or is closed.

I think this is not the right sintax, or I called this from a wrong site
 
The exact line I'm trying with is Forms![Form_name_father].subform.Form![Form_name_son].Repaint from the code of form_son, and the error is that access can't find [Form_father]

¿?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top