code help

awake2424

Registered User.
Local time
Today, 05:29
Joined
Oct 31, 2007
Messages
479
In the After Update:

Code:
Private Sub cboResult_AfterUpdate()
If Me.cboResult = "Negative" Then
Me.txtResult = "Negative"
Me.Text216 = "It is recommended that this individual and any first degree relative receive continued clinical evaluation and follow-up. Genetic counseling is recommended for this individual and their family. For assistance in locating nearby genetic counseling services please contact the director at xxx-xxx-xxxx"
Else
Me.txtResult = ""
End If
End Sub

Both Me.Text should fill when cboResult = Negative but it doesent seem to be working. Thanks
 
"doesent seem to be working" isn't very helpful, but my guess would be that the combo's bound column contains an ID field rather than the text "Negative".
 
If I take out:

Me.Text216 = "It is recommended that this individual and any first degree relative receive continued clinical evaluation and follow-up. Genetic counseling is recommended for this individual and their family. For assistance in locating nearby genetic counseling services please contact the director at xxx-xxx-xxxx"

the code works fine to fill Me.txtResult. Its seems like there is something wrong with the syntax. Thank you.
 
I don't see anything wrong with that syntax. By chance does that textbox have a control source with a calculation in it? Can you post the db here?
 
The Me.Text216 line is highlighted yellow and there is a control source in it, but no formula. Thanks.
 
If you can't post the db, can you post a picture of the form in design view with that textbox selected?
 

Users who are viewing this thread

Back
Top Bottom