Re: Events Assistance
That's it! Thanks! Yes, Yes, it is a miracle! Eureka! It's a Hoover.
Kenny G
Salad <oil@vinegar.com> wrote in message news:<G%Mtc.14808$be.2809@newsread2.news.pas.earth link.net>...[color=blue]
> Kenny G wrote:
>[color=green]
> > Below is the code I currently have to either skip a control or go to a
> > control based on the response in the complications control. The
> > problem is even when Me.Complications is "None" the cursor goes to
> > RiskAssessment. What's wrong with my code?
> >
> > Thanks in advance for your assistance.
> >
> > Private Sub Complications_Exit(Cancel As Integer)
> > If Me.Complications = "None" Then
> > DoCmd.GoToControl "OrderRenewal"
> > Else
> > DoCmd.GoToControl "RiskAssessment"
> > MsgBox "Has A Risk Assessment Form Been Completed?",
> > vbInformation, "UHS"
> > Cancel = True
> > End If
> > End Sub
> >
> > Below is a list that is used for the control:
> >
> > tbl Complications
> > ComplicationsID(long integer) Complications (txtbox (FieldSize
> > 25))
> > 1 None
> > 2 Skin Irritation
> > 3 Skin Breakdown
> > 4 Decreased Sensation
> > 5 Motor Impariment
> >
> > Control Source Complications
> > Row Source Type table/query
> > Row Source SELECT tblComplications.ComplicationsID,
> > tblComplications.Complications FROM tblComplications;
> > Bound Column 1
> >
> > The only code in OrderRenewal is =PC() Proper Case in the afterupdate
> > event.
> >
> >
> >
> > Kenny G[/color]
>
> Yeah, change it to
> If Me.Complications = "1"
> or
> If Me.Complications = 1
> depending on the table value.
>
> Hint: You can use Msgbox to assist in debugging. For example, you
> could enter:
> msgbox Me.Complications
> as the first code line to see what the value is. When finished
> debugging, remove the msgbox line.
>
> I use msgbox to assist in debugging. Sometimes I expect a certain value
> in a variable. Using msgbox, I sometimes find out my variable does not
> contain the expected value. I then get down on my knees in supplication
> and cry out "It's a miracle!" I've had so many miracles in my life my
> workspace is a shrine visited by thousands of programmers. Many have
> arrived on crutches and left as healthy idividuals.[/color] |