Tabbed form problem

T

tmort

I have a multitab form which I have the user step through to ente
data.

when going from one tab to the next I am checking to see that data ha
been entered into the controls for the previous tab.

the code is:

Private Sub MaterialValCheck()
If TxName.Text = "" Then
Beep
MsgBox "Material name must be filled in"
tabs.Value = tabs.Value - 1

curstep = "Material"

Exit Sub
End If

The message appears and afer OK is selected, the previous ta
(tabs.value - 1) is highlighted however all of the controls and tex
that appear on the form are from the tab I am going back from, not th
one I just set the tab value to and that is hightlighted.

It does this if I use

Private Sub MaterialValCheck()
If TxName.Text = "" Then
Beep
MsgBox "Material name must be filled in"
tabs.Value = 1

curstep = "Material"

Exit Sub
End If

When I want to go back from tabs.value = 2 as well.

I'm not sure how well I explained this but any help would b
appreciated. Thanks in advance
 
B

bhofsetz

Why don't you check that data has been entered before incrementing t
the next tab. That way you still have all the controls, etc. from th
tab that the user hasn't entered all the data for
 
T

tmort

I may do that. It's just that I originally did it the way I mentione
and somewhere along the line I changed something to make it not wor
right and its driving me crazy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top