|
-
May 15th, 2002, 10:52 AM
#1
Thread Starter
Registered User
what is going down here?
alright, this maybe be lengthy to explain, but i will give it a shot. i have a form, where the user can enter how many stations are needed, and in turn, then hits the next button, and a new form loads, and depending on how many stations the user entered previously, that is how many text boxes are enabled.
before, when the user hit the next button, i unloaded the form. but i also have back buttons. so recently, i discovered that, if you don't unload the form, and just do a form.hide, the data entered is still there. so when you hit the back button, i hide the second form.
the problem is, if the user enters more stations, the text boxes in the next form are all the same as the first input.
the code in the next button is the following
VB Code:
Headway = Text1
Stations = Text2
DailyBoardings = Text3
VolumeConstant = Text4
frmHeadway.Hide
DoEvents
Load frmTravelTimes
frmTravelTimes.Show vbModal
why doesn't it update the second form? i name stations = text2, and upon line load traveltimes has the following code
VB Code:
Private Sub Form_Load()
'Initialize TextBoxes and Labels
10 For s = 0 To 6
20 Text1(s).Enabled = False
30 Label1(s).Enabled = False
40 Next
50 For s = 0 To (Stations - 2)
60 Text1(s).Enabled = True
70 Label1(s).Enabled = True
80 Next
End Sub
does it skip over the load if it is already loaded? do u need to do an unload for it to update a form. i hope i explained this well enough. there maybe a simple answer.
thanks
jeff
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
|