OpenArgs not being passed

D

Dave14117

I am passing a combo's NotInList NewData to another as follows:
DoCmd.OpenForm "frmCustomers", , , , acFormAdd, acDialog, _
NewData

In the NotInList Sub, NewData has data. In the Open event for frmCustomers,
OpenArgs is Null. Anyone have an idea why?
 
K

Ken Snell \(MVP\)

Try testing OpenArgs in the form's Load event. Is it still Null there?
 
D

Dave14117

thanks. Yes it is Null in Load event as well.

I thought using OpenArgs in the Open event was pretty standard stuff
--
Thanks,

Dave


Ken Snell (MVP) said:
Try testing OpenArgs in the form's Load event. Is it still Null there?
 
D

Douglas J. Steele

You sure NewData is set to hold the value?

Show the code that sets it.
 
D

Dave14117

Not exactly sure what you mean. In Debug, in the DoCmd noted below, NewData
contains the string the user entered. Note this problem also occurs if I
replace NewData with a string literal...nothing is passed.
--
Thanks,

Dave


Douglas J. Steele said:
You sure NewData is set to hold the value?

Show the code that sets it.
 
D

Dirk Goldgar

Dave14117 said:
Not exactly sure what you mean. In Debug, in the DoCmd noted below,
NewData contains the string the user entered. Note this problem also
occurs if I replace NewData with a string literal...nothing is passed.

The form is not already open by any chance, is it?
 
V

Van T. Dinh

If you open the Form in design view by VBA code, you still use the OpenForm
method. So in design mode or normal mode, the Form is definitely open!
 

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