Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query can not read a form's control (for experts only)

Status
Not open for further replies.

dancarr22

Programmer
Oct 15, 2002
8
0
0
CA
Hello,
Very bizarre problem. We are using Access 2000 and our queries recently 'stopped working'. When we try to add a column to the query which references a form's control: Expr1: [Forms]![Form1]![txtName]--it works ONLY IF the value being returned is a String. If a date or number is in the form field the query returns a blank or some other strange character. FACTS: (1) The form IS based on a table. (2) We have attempted to set the format/field type of the query field. (3) Changing the default field type (under Options) has not helped. Solve this and we'll be thankful and recommend you.
 
I would try:

Expr1: Trim(" " & [Forms]![Form1]![txtName])
This will evaluate blanks (nulls) to "" and will force the expression 'think' it calculates a string...

HTH
[pipe]
Daniel Vlas
Systems Consultant
danvlas@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top