Minggu, 23 November 2014

RE: [MS_AccessPros] Need help on opening FORM

 

Thank you Duane, I receive compile error: Case without Select Case
Kambiz

--------------------------------------------
On Sun, 11/23/14, Duane Hookom duanehookom@hotmail.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

Subject: RE: [MS_AccessPros] Need help on opening FORM
To: "Access Professionals Yahoo Group" <ms_access_professionals@yahoogroups.com>
Date: Sunday, November 23, 2014, 2:36 PM


 











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         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"












#yiv9646466708 #yiv9646466708 --
#yiv9646466708ygrp-mkp {
border:1px solid #d8d8d8;font-family:Arial;margin:10px
0;padding:0 10px;}

#yiv9646466708 #yiv9646466708ygrp-mkp hr {
border:1px solid #d8d8d8;}

#yiv9646466708 #yiv9646466708ygrp-mkp #yiv9646466708hd {
color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px
0;}

#yiv9646466708 #yiv9646466708ygrp-mkp #yiv9646466708ads {
margin-bottom:10px;}

#yiv9646466708 #yiv9646466708ygrp-mkp .yiv9646466708ad {
padding:0 0;}

#yiv9646466708 #yiv9646466708ygrp-mkp .yiv9646466708ad p {
margin:0;}

#yiv9646466708 #yiv9646466708ygrp-mkp .yiv9646466708ad a {
color:#0000ff;text-decoration:none;}
#yiv9646466708 #yiv9646466708ygrp-sponsor
#yiv9646466708ygrp-lc {
font-family:Arial;}

#yiv9646466708 #yiv9646466708ygrp-sponsor
#yiv9646466708ygrp-lc #yiv9646466708hd {
margin:10px
0px;font-weight:700;font-size:78%;line-height:122%;}

#yiv9646466708 #yiv9646466708ygrp-sponsor
#yiv9646466708ygrp-lc .yiv9646466708ad {
margin-bottom:10px;padding:0 0;}

#yiv9646466708 #yiv9646466708actions {
font-family:Verdana;font-size:11px;padding:10px 0;}

#yiv9646466708 #yiv9646466708activity {
background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}

#yiv9646466708 #yiv9646466708activity span {
font-weight:700;}

#yiv9646466708 #yiv9646466708activity span:first-child {
text-transform:uppercase;}

#yiv9646466708 #yiv9646466708activity span a {
color:#5085b6;text-decoration:none;}

#yiv9646466708 #yiv9646466708activity span span {
color:#ff7900;}

#yiv9646466708 #yiv9646466708activity span
.yiv9646466708underline {
text-decoration:underline;}

#yiv9646466708 .yiv9646466708attach {
clear:both;display:table;font-family:Arial;font-size:12px;padding:10px
0;width:400px;}

#yiv9646466708 .yiv9646466708attach div a {
text-decoration:none;}

#yiv9646466708 .yiv9646466708attach img {
border:none;padding-right:5px;}

#yiv9646466708 .yiv9646466708attach label {
display:block;margin-bottom:5px;}

#yiv9646466708 .yiv9646466708attach label a {
text-decoration:none;}

#yiv9646466708 blockquote {
margin:0 0 0 4px;}

#yiv9646466708 .yiv9646466708bold {
font-family:Arial;font-size:13px;font-weight:700;}

#yiv9646466708 .yiv9646466708bold a {
text-decoration:none;}

#yiv9646466708 dd.yiv9646466708last p a {
font-family:Verdana;font-weight:700;}

#yiv9646466708 dd.yiv9646466708last p span {
margin-right:10px;font-family:Verdana;font-weight:700;}

#yiv9646466708 dd.yiv9646466708last p
span.yiv9646466708yshortcuts {
margin-right:0;}

#yiv9646466708 div.yiv9646466708attach-table div div a {
text-decoration:none;}

#yiv9646466708 div.yiv9646466708attach-table {
width:400px;}

#yiv9646466708 div.yiv9646466708file-title a, #yiv9646466708
div.yiv9646466708file-title a:active, #yiv9646466708
div.yiv9646466708file-title a:hover, #yiv9646466708
div.yiv9646466708file-title a:visited {
text-decoration:none;}

#yiv9646466708 div.yiv9646466708photo-title a,
#yiv9646466708 div.yiv9646466708photo-title a:active,
#yiv9646466708 div.yiv9646466708photo-title a:hover,
#yiv9646466708 div.yiv9646466708photo-title a:visited {
text-decoration:none;}

#yiv9646466708 div#yiv9646466708ygrp-mlmsg
#yiv9646466708ygrp-msg p a span.yiv9646466708yshortcuts {
font-family:Verdana;font-size:10px;font-weight:normal;}

#yiv9646466708 .yiv9646466708green {
color:#628c2a;}

#yiv9646466708 .yiv9646466708MsoNormal {
margin:0 0 0 0;}

#yiv9646466708 o {
font-size:0;}

#yiv9646466708 #yiv9646466708photos div {
float:left;width:72px;}

#yiv9646466708 #yiv9646466708photos div div {
border:1px solid
#666666;height:62px;overflow:hidden;width:62px;}

#yiv9646466708 #yiv9646466708photos div label {
color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}

#yiv9646466708 #yiv9646466708reco-category {
font-size:77%;}

#yiv9646466708 #yiv9646466708reco-desc {
font-size:77%;}

#yiv9646466708 .yiv9646466708replbq {
margin:4px;}

#yiv9646466708 #yiv9646466708ygrp-actbar div a:first-child {
margin-right:2px;padding-right:5px;}

#yiv9646466708 #yiv9646466708ygrp-mlmsg {
font-size:13px;font-family:Arial, helvetica, clean,
sans-serif;}

#yiv9646466708 #yiv9646466708ygrp-mlmsg table {
font-size:inherit;font:100%;}

#yiv9646466708 #yiv9646466708ygrp-mlmsg select,
#yiv9646466708 input, #yiv9646466708 textarea {
font:99% Arial, Helvetica, clean, sans-serif;}

#yiv9646466708 #yiv9646466708ygrp-mlmsg pre, #yiv9646466708
code {
font:115% monospace;}

#yiv9646466708 #yiv9646466708ygrp-mlmsg * {
line-height:1.22em;}

#yiv9646466708 #yiv9646466708ygrp-mlmsg #yiv9646466708logo {
padding-bottom:10px;}


#yiv9646466708 #yiv9646466708ygrp-msg p a {
font-family:Verdana;}

#yiv9646466708 #yiv9646466708ygrp-msg
p#yiv9646466708attach-count span {
color:#1E66AE;font-weight:700;}

#yiv9646466708 #yiv9646466708ygrp-reco
#yiv9646466708reco-head {
color:#ff7900;font-weight:700;}

#yiv9646466708 #yiv9646466708ygrp-reco {
margin-bottom:20px;padding:0px;}

#yiv9646466708 #yiv9646466708ygrp-sponsor #yiv9646466708ov
li a {
font-size:130%;text-decoration:none;}

#yiv9646466708 #yiv9646466708ygrp-sponsor #yiv9646466708ov
li {
font-size:77%;list-style-type:square;padding:6px 0;}

#yiv9646466708 #yiv9646466708ygrp-sponsor #yiv9646466708ov
ul {
margin:0;padding:0 0 0 8px;}

#yiv9646466708 #yiv9646466708ygrp-text {
font-family:Georgia;}

#yiv9646466708 #yiv9646466708ygrp-text p {
margin:0 0 1em 0;}

#yiv9646466708 #yiv9646466708ygrp-text tt {
font-size:120%;}

#yiv9646466708 #yiv9646466708ygrp-vital ul li:last-child {
border-right:none !important;
}
#yiv9646466708

__._,_.___

Posted by: Kambiz Afshartous <kenaf42@yahoo.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (4)

.

__,_._,___

Tidak ada komentar:

Posting Komentar