Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Want to update unbound textbox on subform

Status
Not open for further replies.

moremind

Programmer
Mar 2, 2005
6
0
0
US
Can someone please tell me how to update an unbound textbox on a subform? Subroutine says:

If Me.Form.xstatus = 1 then
Me.Form.xtxtbox = "Active"
Else
Me.Form.xtxtbox = "Expired"

but the only thing that displays is #Error. It seems like it should be soooo simple but not!

I can display the xstatus value to the screen okay so I thought that meant the syntax was okay.

strval = Me.Form.[xstatus]
MsgBox (strval)

Please give some suggestions if you can.
Thank you.


 
What about this

If Me.Form.xstatus.value = 1 then
Me.Form.xtxtbox.value = "Active"
Else
Me.Form.xtxtbox.value = "Expired"
 
And this ?
If Me!xstatus.Value = 1 Then
Me!xtxtbox.Value = "Active"
Else
Me!xtxtbox.Value = "Expired"
End If

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 

I gave it a try but still get the #Error displayed.
Me.Form.xtxtbox.value = "Active"

Why is this so hard!??!?!?!
thx
 
Why is this so hard
Have you tried the expression builder ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top