Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Posts
    4

    Angry Unanswered: What if OpenArgs is null?

    Hi,

    I am using one form for more things. Sometimes, it is directly opened, other times, it is opened by another form.

    When it is opened by another form, there are arguments in the Args-tag (docmd.openform)

    Now, I want to check if the form is directly opened or by another form by checking the OpenArgs:

    If OpenArgs = Null Then
    'the form is directly opened
    else
    'the form is opened by another form
    end if

    Now the problem is in the first line. It don't work correctly. I tried also 'is null' and ' openargs = "" '

    Any suggestion?

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713

    Re: What if OpenArgs is null?

    Originally posted by haai
    Hi,

    I am using one form for more things. Sometimes, it is directly opened, other times, it is opened by another form.

    When it is opened by another form, there are arguments in the Args-tag (docmd.openform)

    Now, I want to check if the form is directly opened or by another form by checking the OpenArgs:

    If OpenArgs = Null Then
    'the form is directly opened
    else
    'the form is opened by another form
    end if

    Now the problem is in the first line. It don't work correctly. I tried also 'is null' and ' openargs = "" '

    Any suggestion?
    Try:

    If Me.OpenArgs & "" <> "" then

  3. #3
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Access is funny when dealing with Null. It doesn't seem to recognize null as a value, so much as a state. Try this:


    If IsNull(me.OpenArgs) Then
    'the form is directly opened
    else
    'the form is opened by another form
    end if

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •