Determine the forms datamode

G

Guest

How can I determine the current datamode of a form when it is opening. I want
to display a different caption depending on whether the mode is acFormAdd or
acFormEdit.

Will use it in a select statement

Select Case Mode
Case acFormAdd
Me.Caption = "Add New Customer"
Case acFormEdit
Me.Caption = "Customer Details"
End Select

Cheers, Wayne.
 
J

Jeff Conrad

Private Sub Form_Open(Cancel As Integer)
Select Case Me.Form.DataEntry
Case True
Me.Form.Caption = "Add New Customer"
Case False
Me.Form.Caption = "Customer Details"
Case Else
' Nothing
End Select
End Sub
 

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

Top