OpenArgs does not work

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to pass an argument from one form to another, using the
docmd.openform command and setting the "openargs" element to a string
"strCompCode" now when the second form opens, in the Load event I use the
"Me.OpenArgs" to capture what is being passed, but it always returnsa a null,
even though i can see that strCompCode has a value in it. There is one more
curious thing that happens, when i trace the code (F8) and go into the Load
even of the 2nd form, it goes throught it twice, the second time around it
picks up the "openargs" element, very strange! can someone help me out with
that?

Thank you in advance!
 
Caxapok said:
I am trying to pass an argument from one form to another, using the
docmd.openform command and setting the "openargs" element to a string
"strCompCode" now when the second form opens, in the Load event I use
the "Me.OpenArgs" to capture what is being passed, but it always
returnsa a null, even though i can see that strCompCode has a value
in it. There is one more curious thing that happens, when i trace the
code (F8) and go into the Load even of the 2nd form, it goes throught
it twice, the second time around it picks up the "openargs" element,
very strange! can someone help me out with that?

Thank you in advance!

Are you maybe setting the form's RecordSource in the Open or Load event?
Or could this actually be a subform on the second form you opened?
 
Both a "no", not setting record source, and it is not a subform...
Thank you for your reply!
 
I tried using it, however I can not trace the code once the second form opens
up, and it is very annoying. I am not sure what's happaning, this is the
first time I am getting this problem. Thank you for your reply!
 
Caxapok said:
Both a "no", not setting record source, and it is not a subform...
Thank you for your reply!

I can't see why you're having the problem, then. If you'd like to send
me a *cut-down* copy of your database, containing only the elements
necessary to demonstrate the problem, compacted and then zipped to less
than 1MB in size (preferably much smaller) -- I'll have a look at it,
time permitting. You can send it to the address derived by removing NO
SPAM from the reply address of this message.
 
Back
Top