Control Source property

  • Thread starter Thread starter davidjurban
  • Start date Start date
D

davidjurban

is it not possible to populate a text box using both Control Sourc
property and using a DLookUp triggered by an event? I used the Contro
Source method to originally populate the text box then attempted to ad
code to repopulate the text box upon change of another field. Thi
method produces a run time error... '-2147352567 (800200009)' Yo
can't assign a value to this object.

Sooooo...if there is a conflict using the Control Source property...ho
do I populate the fields in each record initially? Can I assign th
expression to an event that is associated with the creation of eac
record in the database?
 
Used Control Source with expression....

= DLookup("[fax]", "[service agent]", "[service agent] =
Forms![service call]![service agent]")

to populate the field. Then used the following expression in th
Change event to repopulate after the record has been displayed an
changed. This is the code which is being flagged by the erro
message..."can't set value"...

[Form_service call].service_agent_fax = DLookup("[fax]", "[servic
agent]", "[service agent] = Forms![service call]![service agent]"
 
Thanx. I believe I have worked it out. I took the expression out o
the Control Source property and imbedded it in the Form Current even
of the Form properties. The form now updates the fields in questio
upon displaying a new record and after a change to the record. Ther
is an example in Access help under Programming Information/Working wit
events/Using Event procdures to work with forms/ ..
 
Back
Top