tankertert
New member
- Local time
- Today, 06:15
- Joined
- Sep 22, 2012
- Messages
- 7
Hi guys.
I have an update query that works fairly well, until the textbox that the criteria is based upon is blank.
I have a form that is bound to a table, with several textboxes that inherit from a combobox (this all works perfectly). After selecting the record, the user then types into another textbox what they want the record to update to. The "update to" line of the update query inherits from this line.
In the criteria lines of the query, the criteria is set to the equivalent textbox on the form, using:
[Forms]![myForm].[txtboxName]
However, when the textbox is blank, the query doesnt return any results, because it's looking for a blank record in that field.
What do i put in the criteria line so that it either takes the criteria from the textbox if it has something in there, or ignores it if the textbox is blank?
Thanks
I have an update query that works fairly well, until the textbox that the criteria is based upon is blank.
I have a form that is bound to a table, with several textboxes that inherit from a combobox (this all works perfectly). After selecting the record, the user then types into another textbox what they want the record to update to. The "update to" line of the update query inherits from this line.
In the criteria lines of the query, the criteria is set to the equivalent textbox on the form, using:
[Forms]![myForm].[txtboxName]
However, when the textbox is blank, the query doesnt return any results, because it's looking for a blank record in that field.
What do i put in the criteria line so that it either takes the criteria from the textbox if it has something in there, or ignores it if the textbox is blank?
Thanks