Whenever I have multiple options I use Select Case like:
Private Sub What_AfterUpdate()
Case Me.What
Case "Vehicle", "Computer", "Printer"
' Open related form
DoCmd.OpenForm "PopUpformService"
Case Else
' don't know what to do here
End Select
A better solution is to store some value in some table that identifies "Vehicle", "Computer", "Printer".
Duane Hookom MVP
MS Access
Posted by: kenaf42@yahoo.com
Private Sub What_AfterUpdate()
Case Me.What
Case "Vehicle", "Computer", "Printer"
' Open related form
DoCmd.OpenForm "PopUpformService"
Case Else
' don't know what to do here
End Select
A better solution is to store some value in some table that identifies "Vehicle", "Computer", "Printer".
Duane Hookom MVP
MS Access
Posted by: kenaf42@yahoo.com
Date: Sun, 23 Nov 2014 11:17:53 -0800
In Access 07, I am using the following procedure to open second FORM when user enter certain text in a field of the first FORM.
Private Sub What_AfterUpdate()
' If user entered "Vehicle",
If Me.What = "Vehicle" Then
' Open related form
DoCmd.OpenForm "PopUpformService"
End If
Question: How could I have multiple entries in Me.What=.
Example: If Me.What = "Vehicle" or "Computer" or "Printer" Then
DoCmd.OpenForm "PopUpformService"
__._,_.___
Posted by: Duane Hookom <duanehookom@hotmail.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (3) |
.
__,_._,___
Tidak ada komentar:
Posting Komentar