|
-
March 23rd, 2001, 09:31 AM
#1
If Else
Hi There,
I'm very new at VB programming. Right now the below code will load the form even if it has been filled already. What I want to know the syntax of checking to me sure that only if the form is not filled than the form should load in the LostFocus event. If the form is already filled, the form should not load. Can someone please help.
private Sub ctlDoctorInformation_LostFocus(Index as Integer)
If ctlDoctorInformation (Index).GetChoiceValue = "Y" then
Dim myDoctorInformation as DoctorInformationServer.DoctorIndormation
set myDoctorInformation = new DoctorInformationServer.DoctorInformation
Call myDoctorInformation.LoadForm(m_NonMedicalEvidence.GetItemByKey(Trim$(Str$(Index)), nothing), _ m_iMyEvidFunctions.OptionValueToBoolean(ctlUsualPhysician(Index).GetChoiceValue), m_Language)
set myDoctorInformation = nothing
End If
End Sub
Thanks in advance!
Anne
-
March 24th, 2001, 12:40 AM
#2
Re: If Else
first of all avoid using the lostfocus event. Also could u elaborate more on what the ctlDoctorInfo... controls are ( what vb controls r u using). Also check what if condition evaluates to. It may be so that the value u r checking is not getting set to "Y" after the form is filled in. Hope this helps.
-
March 27th, 2001, 11:27 AM
#3
Re: If Else
ctlDoctorInfo control is control that contains some more questions to ask the paient once a "Yes" answer is selected. All I need is to go into the loadform only if a "yes" has been selected and that there are no information entered in the form.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|