Passing a Parameter to a Form whilst Opening 
Author Message
 Passing a Parameter to a Form whilst Opening

Learned Friends

It's been a few years since I've written code so your help would be
appreciated.  I'm opening a form with:

frmProcessAction.Show vbModal, Me

but want to pass a parameter as well.  I'm sure you used to be able to just
add it to the list!

Thanks in advance

Scott



Fri, 17 May 2002 03:00:00 GMT  
 Passing a Parameter to a Form whilst Opening

Quote:

>Learned Friends

>It's been a few years since I've written code so your help would be
>appreciated.  I'm opening a form with:

>frmProcessAction.Show vbModal, Me

>but want to pass a parameter as well.  I'm sure you used to be able to just
>add it to the list!

Nope: never in VB.  A VB form will load itself when any of its methods are
called, though, so here is one possible approach

Public Sub MyShow(Mode, Parent, otherparam)
  'do something with otherparam...
  Me.Show Mode, Parent

And call it with Form1.MyShow vbModal, Me, 12.3 'or whatever

Jim Deutch
MS Dev MVP



Fri, 17 May 2002 03:00:00 GMT  
 Passing a Parameter to a Form whilst Opening
You could place a public property / variable in 'frmProcessAction' then....

frmProcessAction.SomeProperty = Whatever
frmProcessAction.Show vbModal, Me

Quote:

> Learned Friends

> It's been a few years since I've written code so your help would be
> appreciated.  I'm opening a form with:

> frmProcessAction.Show vbModal, Me

> but want to pass a parameter as well.  I'm sure you used to be able to just
> add it to the list!

> Thanks in advance

> Scott



Fri, 17 May 2002 03:00:00 GMT  
 Passing a Parameter to a Form whilst Opening


Fri, 19 Jun 1992 00:00:00 GMT  
 Passing a Parameter to a Form whilst Opening
Thanks


Sat, 18 May 2002 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Parameter passing and Opening/Closing Forms

2. Opening an ADOX Catalog Whilst ADO Recordset is Open

3. Forms Collection: Using it to Open Forms by Passing the Form Name as a String Variable

4. Pass Parameter from form to form

5. How can I pass parameter from a form to another form

6. How do I open a form by passing the Name of the form as a string

7. Passing parameters to MS WORD objects to open a document

8. Passing parameters to Access query using Recordset.Open

9. Passing parameters use JET OLEDB with Recordset.Open

10. Open an app and pass parameters

11. Splash form whilst loading

12. Progress Bar - whilst Access form's Recordsource is requerying

 

 
Powered by phpBB® Forum Software