Selasa, 07 Januari 2014

[MS_AccessPros] RE: How do I create a Public Select Case statement

 

Phucon


Create the public sub in a standard module. Use the control that you are checking as a parameter.


Let's say the value yoiu want to check is a combo box with the bound column being a long.


Public Sub ChKUsersSelection(ctrl As Control)

    Select Case Options

        Case 1

                    Enter…

        Case 2

                    Edit…

        Case 3

                    Delete…

        Case 4

                    Open…

End Select

End Sub


To call it from the combo's AfterUpdate event:

Private Sub cboSelection()

call ChKUsersSelection(Me.cboSelection)

End Sub


Regards,

Bill Mosca, Founder - MS_Access_Professionals

http://www.thatlldoit.com

Microsoft Office Access MVP

http://mvp.microsoft.com/en-us/mvp/Bill%20Mosca-35852

My nothing-to-do-with-Access blog

http://wrmosca.wordpress.com


__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar