By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
462,178 Members | 646 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 462,178 IT Pros & Developers. It's quick & easy.

Reference a particular field/row

P: 9
From a table, how do I get the data from a particular row and field into a text box.?

I have tried a searching the forum, but I can't find ROW and field to text box.
TIA, Gordon.
Nov 6 '06 #1
Share this Question
Share on Google+
3 Replies

P: 143
You can't. You can use a combo box or a list box though.
Nov 6 '06 #2

Expert Mod 15k+
P: 31,770
Use =DLookUp() in the 'Control Source' property of your TextBox.

DLookup(expr, domain[, criteria])

The DLookup function has the following arguments.

Argument Description
expr An expression that identifies the field whose value you want to return. It can be a string expression identifying a field in a table or query, or it can be an expression that performs a calculation on data in that field. In expr, you can include the name of a field in a table, a control on a form, a constant, or a function. If expr includes a function, it can be either built-in or user-defined, but not another domain aggregate or SQL aggregate function.
domain A string expression identifying the set of records that constitutes the domain. It can be a table name or a query name.
criteria An optional string expression used to restrict the range of data on which the DLookup function is performed. For example, criteria is often equivalent to the WHERE clause in an SQL expression, without the word WHERE. If criteria is omitted, the DLookup function evaluates expr against the entire domain. Any field that is included in criteria must also be a field in domain; otherwise, the DLookup function returns a Null.
Nov 6 '06 #3

P: 143
Oops, forgot about DLookUp. Nice one.
Nov 7 '06 #4

Post your reply

Sign in to post your reply or Sign up for a free account.