Change Caption by code - problem

  • Thread starter Thread starter jhweb_online
  • Start date Start date
J

jhweb_online

I have this database with a main form. This database application
manages several underlying klients. I have a button that's labeled
"Change user" which pops up a normal little form where one chooses a
new user from a combo box. Everything works ok but I'm having troubles
getting part of the Caption of this main form to change. If I start the
application and choose the user then the users name becomes a part of
the caption as desired. But if I try to switch user as described
earlier then the caption doesn't change.
The code:

Private Sub Form_Activate()
Me.Caption = "Bla bla bla [ " & DLookup("[tbl_name]", "namn") & " ]"
Me.Refresh
End Sub

Tried with Me.Requery but the caption won't update as expected. Any
help would be soo nice.
 
Try placing the code in the Enter event of the comobox where you select the
user. I believe the problem you are seeing is the fact the Activate event
is not getting fired when the change users.
 
Back
Top