Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing Arguements between Forms

Status
Not open for further replies.

vanyel

Technical User
Aug 23, 2003
2
CA
I have a combo box populated from a database, and then when a user selects a certain item and click view, it will pass the name of the item to the next form which will then get information on that item from the database.
 
1. Either use a Public variable declared as such in the 2nd form's declaration section:

Form2.MyPublicVariable

2. Use A Public Property Let proceedure

3. Open the 2nd form using you own Public Open Proceedure and pass the value as an argument:

Public DisplayForm(Optional ByVal SomeArgument1 As Long, Optional ByVal ShowMethod As FormShowConstants = vbModeless)

If SomeArgument1 Then
'Handle argument
End If
Me.Show ShowMethod

End Sub
 
There is a FAQ on this subject.

Chip H.


If you want to get the best response to a question, please check out FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top