Change a control source of an unbound field

C

CyndyG

Is it possible to do the following:

Customer Engineer Name
Operator Name.
The unbound field control source is: =getelapsedtime
All other fields are bound.

If the Customer Engineer repairs a problem then the field looks like this
=getelapsedtime(nz([Time CE Arrived]),nz([Return to Service]))

I would like to be able to change the control to:
=getelapsedtime(nz([CE Return Call),nz([Return to Service])) if the operator
fixes the problem
 
A

Alex Dybenko

Hi,
suggest that you keep this field bound to same field, and add this field as
expression to underlying query, like

iif(<Customer Engineer repairs expression >,getelapsedtime(nz([Time CE
Arrived]),nz([Return to Service])),getelapsedtime(nz([CE Return
Call),nz([Return to Service])))

Or you can use form's current or after update event (or perhaps both) to set
this field value as:

if <Customer Engineer repairs expression > then
me.textbox1=getelapsedtime(nz([Time CE Arrived]),nz([Return to
Service]))
else
me.textbox1=getelapsedtime(nz([CE Return Call),nz([Return to Service])))
end if

--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top