open args working intermittantly

D

dp

Hi everyone,

I have seen other posts on this forum about open args working incorrectly.
I have had this same problem. It sometimes passes no value, although it is
clearly set in the passer form

I have also implicitly set it:
OpenArgs:="whatever"

I have tried to set openargs in open and load events like this:

Private Sub Form_Open(Cancel As Integer)
sOpenArgs = Me.OpenArgs & ""
End Sub

and when I walk through the procedure
the passer form:eek:penargs is set correctly and

me.openargs is null in the passee form

This is driving me nuts, any help would be great!

dp
 
M

Matthias Klaey

dp said:
Hi everyone,

I have seen other posts on this forum about open args working incorrectly.
I have had this same problem. It sometimes passes no value, although it is
clearly set in the passer form

I have also implicitly set it:
OpenArgs:="whatever"

I have tried to set openargs in open and load events like this:

Private Sub Form_Open(Cancel As Integer)
sOpenArgs = Me.OpenArgs & ""
End Sub

and when I walk through the procedure
the passer form:eek:penargs is set correctly and

me.openargs is null in the passee form

This is driving me nuts, any help would be great!

dp

I think this is because the form is already open when you are stepping
through the code. This can easily happen while you arte debugging the
application. OpenArgs are only passed when the form is closed. So make
sure the "passee" form is closed when you execute the OpenForm
command.

HTH
Matthias Kläy
 
A

Allen Browne

AFAIK, OpenArgs works perfectly.

As Matthias points out, if the form is already open then Access retains the
original OpenArgs value that was used when the form was opened. That may not
be what you expected, but it makes sense.
 
D

dp

OK, I think thats what it was. I had the form open in design mode and so when
I called it it wasn't closed.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top