Hi there,
I am having trouble with public variables.
I am trying to create a public variable when a button is pressed. and then recall it on a different form. I cant seem to get it working.
The code on form 1 is:
Private Sub cmdstu_Click()
fmpay1.Text1 = "Students"
fmpay1.Text2 = "0.80"
strtype = "students"
fmdest1.Show
fmticket.Hide
End Sub
on the module: Public strtype As String
on the second form:
Private Sub Form_Load()
txttot.Text = strtype
End Sub
Ideally what I am trying to do is capture what was pressed and then add it into a shopping basket type environment of the second form. I can get the detail to show using the
fmpay1.Text1 = "Students"
line but then when I try to make it back into a sting it doesnt work strtype = Text1.Text
any ideas ?