I am creating a wizard interface for completing a form, does anyone know the vb code to show the next tab when clicking on a cmd button? So I can have Next and Prev buttons. Thanks.
I'm not sure what kind of wizard you're doing but maybe you could look at this code to create Previous and Next buttons for a form: (In the following, Type is the field you're searching on)
Sub NavByType(Direction)
Dim R As RecordSet
Set R = Me.Recordsetclone
R.Bookmark = Me.Bookmark
If Direction = "B" Then
R.FindPrevious "[Type] = '" & Me![Type] & "'"
Else
R.FindNext "[Type] = '" & Me![Type] & "'"
End If
If R.NoMatch Then
Msgbox "No More Matches"
Else
Me.BookMark = R.BookMark
End If
End Sub
On your command button for Previous, on the On Click type
NavByType Direction:="B"
On your command button for Next, on the On Click type
NavByType Direction:="F"
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.