Microsoft
Software
Hardware
Network
Question : Access: IF ELSE better or SELECT CASE?
Hello experts,
I have a tab control with few tabs in it.
In each tab, I have a tick box called "Next"
So in Tab1, if a user completed, he will click Next and proceed to Tab2 and so on.
I am planning to code something like this:
When Next checkbox in Tab1 is selected, then next time the form on current will set focus on Tab2 and so on.
Here's the code I using IF ELSE but don't really work well
If Me.Check1 = True Then
Me.Page2.SetFocus
End If
If Me.Check1 = True And Me.2 = True Then
Me.Page3.SetFocus
End If
I have also tried using Select Case but wasn't sure how to use it.
Please help!
Thanks!
Answer : Access: IF ELSE better or SELECT CASE?
Go for false rather than true. The first form that is not read (not checked) is where you focus.
If Not Me.Check1 Then
Me.Page1.SetFocus
ElseIf Not Me.Check2 Then
Me.Page2.SetFocus
...
Else ' last page does not need test
Me.PageX.SetFocus
End If
Random Solutions
PayPal Express Checkout Module
WSUS Clients not reporting to the WSUS console or SBS 2008 Console
How do I delegate control to a user to ONLY remotely use Get-MessageTrackingLong cmdlet?
Windows 2003 Interview Questions
Failed to allocate port error when configuring EM (Oracle 11g)
Task Manager and regedit 'disabled by administrator', unable to access Safe Mode, Antivirus deactivated
Accessing GPT drive on windows 7 from Windows XP
Look Up in Query
Internet problems after Domain Controller Upgrade 2008 Server R2 x64
Outlook calendar issue. Some users who i did not share the calendar in local or exchange. Are able to see my calendar.