Form Title Bar

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I have a database that is used to enter orders. I would like to add the
current order that is being worked to the form Title Bar. I am hope that
someone will be able to help..
Thanks in advance
 
The property you want is the Caption. Use the Current event of the form to
change it to the current order for existing records. The example below has
made up names, use your own:

Me.Caption = Iif(Me.NewRecord, "New Order", Me.txtOrderNumber)

Also, you will need to put something similar in the After Update event so
when an order number has been entered for a new record, it will be displayed
in the Caption.

Me.Caption = Nz(Me.txtOrderNumber, "None")

I put the Nz in there so if a user deletes the order number, it will not get
an Invalid Use of Null error. Instead it will say None. If you want
something different for this case, change None to whatever you want.
 
Works Great!!
THANK YOU!!

Klatuu said:
The property you want is the Caption. Use the Current event of the form to
change it to the current order for existing records. The example below has
made up names, use your own:

Me.Caption = Iif(Me.NewRecord, "New Order", Me.txtOrderNumber)

Also, you will need to put something similar in the After Update event so
when an order number has been entered for a new record, it will be displayed
in the Caption.

Me.Caption = Nz(Me.txtOrderNumber, "None")

I put the Nz in there so if a user deletes the order number, it will not get
an Invalid Use of Null error. Instead it will say None. If you want
something different for this case, change None to whatever you want.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top