Textbox value is not being properly disaplyed in query

  • Thread starter Thread starter VBJonC
  • Start date Start date
V

VBJonC

I have a procedure that does many things. As a part of this procedure,
I assign a value from a variable into a textbox using: text1.value =
variable

Then I run a report that has a criteria pointing to this text box. The
report loads with no data.

When I add this column to the query, it is returning as null. When I
look on the screen, the textbox is clearly loaded with the value I had
put in there.

If I pause exectuion and mouseover the textbox.value, it displays the
value I had assigned to it.

The strange part is, if I rerun the query/report right after the
procedure is completed, it executes fine and returns the correct
record and is able to see the value in the textbox. It seems like the
textbox is in some kind of holding state and until the assigning
procedure has completed running, the text box is not finalizing,
making the value available to outside objects.

I have not experienced this before, even though I use this pattern of
report generation a lot.

Any ideas?
 
A "hold" state is close. The value is still in an "edit"
mode (pencil would still appear if you had a record
selector present). Move the focus off the value to a
command button or another control on the form that can
take the focus. This will "update" the field. Remember
that the forms work in DAO and when editing in DAO you
must conduct an UPDATE when finished.

Drew
 
I have a procedure that does many things. As a part of this procedure,
I assign a value from a variable into a textbox using: text1.value =
variable

Just use text1 = variable
 
Drew,

thanks for your help. This did not work. I am already moving the focus
to another field by setting the value in another textbox. One thing to
keep in mind, this field is not bound.

Does anyone have any other ideas?
 
Back
Top