Assigning a value to a field in a report

D

Dave

I want to assign a value to a field in a reoprt id a certain condition is
met.

Within my report's VBA module, I add the following lines:

If d Then
sFilter = "[ResearchID]=" & Forms!F_Research!txtResearchID

Me!txtNoteLong.Value = ""
Else

Me reprsents the report and txtNoteLong is a textbox on the report that I
want to assign a value to.

But using this code I get an error that says I "cannot assign a value to
this object" and "#Name?" displays on the report.

I do not understand. How can I assign a value to a field control on a
report?
 
D

Duane Hookom

Is txtNoteLong bound to a field or expression? I believe you can only use
code like this on unbound controls.
 
M

Mingqing Cheng [MSFT]

Hi Dave,

I wanted to post a quick note regarding the information MVP Duane Hookom
had sent to you to see whether you would like additional assistance or
information regarding this particular issue. We appreciate your patience
and look forward to hearing from you!

Sincerely yours,

Mingqing Cheng

Online Partner Support Specialist
Partner Support Group
Microsoft Global Technical Support Center
 
Top