Displaying variables in form objects

Status
Not open for further replies.

tezread

Registered User.
Local time
Today, 06:53
Joined
Jan 26, 2010
Messages
330
HI there

I have a few fields

Diabetes
Stroke

and what I am trying to do is have it so a score is generated based on whether a patient has yes against those items

So far I have set up a textbox and in the afterupdate bit I have

Code:
Dim score As Integer
score = 0
If Me.DM = "Yes" score = score + 1
If Me.Stroke = "Yes" score = score + 1
End If

I am struggling though to display the score on the text box? Not even sure if this syntax is correct?
 
tezread, you've seen this stuff many times. An IF statement is very basic. Why write it on one line if you're not familiar with that construct?

Write it in the usual format:
Code:
[B]If[/B] Something = Something Then
 
[B]End If[/B]
 
tezread, you've seen this stuff many times. An IF statement is very basic. Why write it on one line if you're not familiar with that construct?

Write it in the usual format:
Code:
[B]If[/B] Something = Something Then
 
[B]End If[/B]


Hi vbainet

I am not puzzled with the IF statement construction but how to display the variable SCORE on my text box?
 
Alright, but I'm telling you that your IF statement is incomplete. Write it the normal way and you will see what is missing.
 
Doh! I forgot the else statement and THEN. 'Rodney you plonker' lol
 
Last edited:
Status
Not open for further replies.

Users who are viewing this thread

Back
Top Bottom