passing "type" variables HELP plz 
Author Message
 passing "type" variables HELP plz

There are several ways to handle the situation but the simplest would be to
pass it to a procedure on form2 which then calls the load event.

Form1
============================
 Dim user As uservar
 _________________________
 Sub form_load()
 user.first = "Mike"
 Text1.Text = user.first
 Form2.ShowForm(user)
 End Sub

 form2
=======================
 Dim user As uservar
 ________________________
 Sub form_load()
        Text1.Text = user.first
 End Sub

Sub ShowForm(ByVal svUser as uservar)
        user = svUser
        Me.Show
End sub

_____________________________________________________________________

                            Endless Knot Enterprises
                      Custom Computer Solution Developers
                        http://www.*-*-*.com/ ~endlessknot
_____________________________________________________________________



Quote:
> Below is 3 parts of prgm.
> Problem is i cant figure out
> how to pass "user.first"
> variable from form to form.

> type.bas
> -------------------
> Type uservar
> first As String * 5
> End Type
> -------------------
> form1
> -------------------
> Dim user As uservar
> _________________________
> Sub form_load()
> user.first = "Mike"
> Text1.Text = user.first
> Form2.Show
> End Sub
> -------------------
> form2
> -------------------
> Dim user As uservar
> ________________________
> Sub form_load()
> Text1.Text = user.first
> End Sub



Sun, 13 Feb 2000 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Loop print "VARIABLE", "VARIABLE"

2. dynamically dim a variable ie dim "variable"&n

3. HELP: "Type Mismatch" when opening recordset

4. input type="image"? PLEASE HELP

5. Need help with "pong" type game

6. HELP with .Bookmarks("variable").Range.InsertFile

7. Multiple Variables in SQL string "HELP"

8. help with "Variable not Defined"

9. *"*-.,._,.-*"* I"LL TRADE VISUAL C++ FOR VBASIC *"*-.,_,.-*"*

10. OpenRecordSet "Type Mismatch"

11. QueryDef.Type property: "Hidden" queries

12. DAO code "Type Mismatch" error

 

 
Powered by phpBB® Forum Software