Specify If Form is in add mode or edit Mode?

themanof83

Registered User.
Local time
Today, 06:23
Joined
May 1, 2008
Messages
73
Hi guys,

I hope this is fairly simple to do. Have looked around but cannot find the answer.
I have a form which is opened from the switchboard either in add mode or edit mode as defined by the switchboard manager. Basically, if the form is opened in add mode (or a record is added in edit mode) I would like some fields in the form to be field in already but the trouble is I don't know the command that picks up what mode the form is in!! Here's the jist:

If Form.DataMode = acAdd then
Me.Field1 = ........
Me.Field2 = .......
End If

Please help, thanks in advance......

Ash
 
In 'add mode' the DataEntry property of the form = True...

Code:
If Me.DataEntry Then
  Me.Field1 = ...
  Me.Field2 = ...
End If
 

Users who are viewing this thread

Back
Top Bottom