Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2002

    Unanswered: OpenArgs question

    I use the "DoCmd.OpenForm stDocName, , , stLinkCriteria, , , JobID & ProjectName" to open a form with the parameters passed in OpenArgs variable. The OpenArgs variable contains the expected data. Then later in the program run, I want to open the form with a different "JobID". When I call the DoCmd.OpenForm.... command (same as above, except with a different Job ID), I don't get the expected data. I get the previous OpenArgs data.

    Example: I call DoCmd.OpenForm with OpenArgs = "TP01", the form opens and I display me.openargs in a message box (it displays "TP01"). When I call DoCmd.OpenForm with OpenArgs = "TP02" and display it in the msgbox, I get "TP01" again. It should be TP02.

    I tried calling DoCmd.close but that makes no difference. Does anyone know what I am doing wrong when I use the OpenArgs property?


  2. #2
    Join Date
    Nov 2001
    If you open your form as a dialog form, your problem will go away.

    DoCmd.OpenForm stDocName, , , stLinkCriteria, , acDialog, JobID & ProjectName


Posting Permissions

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