|
-
May 29th, 2001, 03:02 AM
#1
Opening forms with parameters
According to the help file frm.Show does not support named parameters. Is there any way of passing these parameters without resorting to global variables. In Access you can use
Me.openargs
to get any parameters. Is there a similar command in VB?
Thanks
Andrew
-
May 29th, 2001, 03:47 AM
#2
Re: Opening forms with parameters
If you mean to get the executable program's command line, you can use the Command$
reserved word.
HTH,
D
-------------------------------------------------
Ex. Datis: Duncan Jones
Merrion Computing Ltd
http://www.merrioncomputing.com
-
May 29th, 2001, 03:57 AM
#3
Re: Opening forms with parameters
What I need is to be able to open a form with a parameter string, i.e the result from a list box which will be used in the child form.
Thanks for your help
Andrew
-
May 29th, 2001, 04:08 AM
#4
Re: Opening forms with parameters
In Visual basic you do not need to close one form when another opens. Moreover every loaded form is effectively a global class which can be accessed by other parts of the program.
For example:
'in frmMain
private Sub CommandChild_Click()
frmChild.Show vbModal
End Sub
'in frmChild
private Sub Form_Load()
If frmMain.lstValues.Text = "Customer" then
'\\ customer was selected from listbox
else
'\\ something other than customer was selected
End If
End Sub
hth,
D.
-------------------------------------------------
Ex. Datis: Duncan Jones
Merrion Computing Ltd
http://www.merrioncomputing.com
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|