Help!!! Changing value of unbound textbox in report

  • Thread starter Thread starter Gary
  • Start date Start date
G

Gary

I'm trying to update an unbound text box (bogus) on a report. I want
to be able to print out the english version of the filter used for the
query. I've setup a global variable (search_txt) that contains the
english verbage to use.

In the open event of the report I have tried...
me!bogus = search_txt ' recieved "cannot assign value to this object

' have also tried manualy hard coding value via immediate window and
get same error.

Also...

I know I have the right focus. When I type ?me!bogus.Controlsource in
immediate window it returns the original = "Testing" (which was the
original value when put onto the report.)

temp = """" & Search_txt & """"
' temp has value of "Begin: 3/1/2006 End: 11/10/2006 classified as
First Aid (or greater) In All Region(s) [ 59 Records ]"

Me!bogus.ControlSource = temp
' Report runs but reccieve "syntax error in query recieved"

Please help!!!!!
Very frustrated and spent way too much time for what is supposed to be
simple! I'm sure this is a simple solution.

Thanks,
Gary
 
Gary said:
I'm trying to update an unbound text box (bogus) on a report. I want
to be able to print out the english version of the filter used for the
query. I've setup a global variable (search_txt) that contains the
english verbage to use.

In the open event of the report I have tried...
me!bogus = search_txt ' recieved "cannot assign value to this object

' have also tried manualy hard coding value via immediate window and
get same error.

Also...

I know I have the right focus. When I type ?me!bogus.Controlsource in
immediate window it returns the original = "Testing" (which was the
original value when put onto the report.)

temp = """" & Search_txt & """"
' temp has value of "Begin: 3/1/2006 End: 11/10/2006 classified as
First Aid (or greater) In All Region(s) [ 59 Records ]"

Me!bogus.ControlSource = temp
' Report runs but reccieve "syntax error in query recieved"


I don't understand all that, but you need to be aware that
the report's open event is too soon to assign values to
controls. Try placing your code in the Format event of the
section containing the bogus text box.
 
As my personal hero Homer would say "DOH!"

Put it in the format section. Works fine.
Thanks,
 
Back
Top