Query Not picking up correct text box contents.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a standard form (called Form1) with an unbound textbox called
txtDescription. The default value for the textbox is "test". I also have a
query that pulls the contents of txtDescription:

SELECT Options_Report.ID AS IDENTIFIER,
Forms!Form1.txtDescription AS DESCRIPTION
FROM Options_Report

I need the same description to appear next to each identifier. My problem
is that this query always pulls the default value (test), never the
description that it typed in the txtdescription textbox. If I take out the
default description, then it works... but I really wanted to have a default
value to prompt the users as to the type of content I'm expecting.

What am I doing wrong?

Thank you!
 
SELECT Options_Report.ID AS IDENTIFIER, Forms!Form1.txtDescription AS
DESCRIPTION
WHERE Options_Report.ID = Forms!Form1.txtDescription
FROM Options_Report;
 
Thanks for trying Karl, but the ID is a numeric field, and the Description is
a text field. They will never equal. I need a way to apply the same text (a
variable provided by the user) to every ID.

Thanks again,
 
Karl,

I'm not trying to match anything. All I need to do is take each value from
one field from a table and have it create a report next to a description that
the user supplies. It needs to be the same description all the way down the
page. My logic does pick up a description. But if I have a value in the
default value, it always will pick up the default instead of the message
typed in the box.
 
Ok, what you need is an event or macro to refresh the query after you update
the field in the form. Trigger it from the textbox property After Update.
 
THANK YOU!!

KARL DEWEY said:
Ok, what you need is an event or macro to refresh the query after you update
the field in the form. Trigger it from the textbox property After Update.
 
Back
Top