Article ID: 129301
Article Last Modified on 11/6/2000
Sub Form_Load (Cancel As Integer)
' Set the DefaultEditing property to the value passed in the
' OpenArgs argument.
Me.DefaultEditing = Me.OpenArgs
End Sub
1 = Data Entry 2 = Allow Edits 3 = Read Only 4 = Can't Add Records
Sub Form_Load ()
Dim iSemicolon As Integer
Dim iDefaultEditing As Integer
Dim sWhereCondition As String
' Find the semicolon.
iSemicolon = InStr(Me.OpenArgs, ";")
' If the semicolon is found...
If iSemicolon > 0 Then
'...parse the DefaultEditing and Where Condition arguments...
iDefaultEditing = Left(Me.OpenArgs, iSemicolon - 1)
sWhereCondition = Mid(Me.OpenArgs, iSemicolon + 1)
'...and set the arguments.
Me.DefaultEditing = iDefaultEditing
If sWhereCondition <> "" Then
DoCmd ApplyFilter , sWhereCondition
End If
End If
End Sub
Keywords: kbprb kbusage KB129301