Textbox value is not being properly disaplyed in query

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?
 
D

Drew

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
 
J

John Vinson

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
 
V

VBJonC

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?
 

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