Opening forms and setting captions.

  • Thread starter Thread starter Mike Green
  • Start date Start date
M

Mike Green

Hi All
I am opening the same form but in different states i.e Read Only, Edit and
Add New. using Event Procedure from three different command buttons. Is it
possible to change the caption of the form being opened to remind the user
which state the form was opened in? If so can someone please point me in
the right direction of how this is achieved?

Regards to all

Mike
 
Mike said:
Hi All
I am opening the same form but in different states i.e Read Only,
Edit and Add New. using Event Procedure from three different command
buttons. Is it possible to change the caption of the form being
opened to remind the user which state the form was opened in? If so
can someone please point me in the right direction of how this is
achieved?

In the form's Open event...

If Not Me.AllowEdits Then
Me.Caption = Me.Caption & " (Read Only)"
ElseIf Me.DataEntry Then
Me.Caption = Me.Caption & " (Add New)"
Else
Me.Caption = Me.Caption & " (Edit)"
End If
 
Mike,

After you have opened your form add code for changing your form caption:
forms("myform").caption="Read Only"
 

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