dissapearing text

  • Thread starter Thread starter cinnie
  • Start date Start date
C

cinnie

I'm puzzled by something that I'm sure will be obvious to others.

I have a form (frmTask) with a textbox (txtTitle) having control source...
=Forms!frmMainMenu!txtTitle

Really, I'm just stealing the title from another open form. when it first
opens, frmTask has no records, just a set of comboboxes used to produce
records.

Here's my problem. When frmTask first opens, txtTitle is blank. Only when I
start to use the cbo's and records start appearing does the Title appear. By
stepping through code, I've noticed that the Title doesn't appear until
frmTask's Form_Current fires. How can I get it to appear as soon as the
frmTask opens? (I've tried Me!txtTitle.requery in the form's Open event to
no avail)

Thanks
 
Move your code from the control source to the Form_Load event for frmTask

Private Sub Form_Load()
Me.txtTitle = Forms!frmMainMenu!txtTitle
End Sub

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
 
Thanks Linq - that works great!

As a learner, is there a reason why putting '= Forms!frmMainMenu!txtTitle'
in the textbox's Control Source doesn't work?

Have a happy new year
 
Back
Top