• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 266
  • Last Modified:

Link a textbox with a simple request

Hello guys,

I link a textbox with the result of a request. The request is very simple: Only one result (just a sum of money).
But I have always the same problem when I link it with the expression generator:

Forms![myformular]![textBox].Value returns a #NAME problem

I would like to avoid to create a subform just for one textbox. Thanks to a EE's adviser, i used Dlookup function for another textbox, but in this case of a simple request, the criteria parameter is empty.

Thanks in advance for any clue.


0
Noero
Asked:
Noero
  • 4
  • 4
  • 3
1 Solution
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
You need the Equals sign.

=Forms![myformular]![textBox]
0
 
mbizupCommented:
If this is the ControlSource of a textbox, you need an = sign:

= Forms![myformular]![textBox].Value
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
Is myformular then Name of the Form this text box is on?

Or, is this text box on a subform?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
NoeroAuthor Commented:
I am tired,..I want to link my table to a result of my table so my expression which doesn't work is ;

=myRequest!item.Value written with the expression generator (just clik) and returns a #NAME problem



So sorry!
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
"I want to link my table to a result of my table"
Do you mean "I want to link my textboxto a result of my table"

What is myRequest  ?    relative to Forms![myformular]![textBox] ?



0
 
mbizupCommented:
Are you looking up a value in a table or maybe a result from a query?  You compared this to dlookup with no criteria.

This gives you the first record.  You need to specify the table or query name and the field name.

= dlookup("youfield","yourTableOrQuery")
0
 
NoeroAuthor Commented:
I am looking a result from a query, the result of this query is SumOfTax:14550 for example.
I will try dlookup with just two parameters like you seem to propose but i think I have still tested that.

= dlookup("SumOfTax","myQuery")

 I am not at office now I will try tomorrow.
0
 
mbizupCommented:
That syntax should do the trick for what you are describing, assuming you have just one record.

You may also want to look into the DSum function.
0
 
NoeroAuthor Commented:
We advance because I have a #Error problem now.
0
 
mbizupCommented:
Now that's a very positive approach - looking on the bright side :-)

Are you able to post your database?
0
 
NoeroAuthor Commented:
I succeeded, I changed the request and get another french syntax conflict... Access gives less clues than visual studio when bug arises! Thanks mbizup you have been a precious help to achieve that!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 4
  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now