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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set Default Value on Form to Query Result

Status
Not open for further replies.

Glacil

MIS
Jul 7, 2004
9
US
The pertinent table records transfers of assets from employee to employee, and assets are often transfered more than once.

How do I set the default setting of a forms control so that when a serial number is entered, the last Location and Employee Number (that the asset was formerly transfered to) appears in the relevent (transfered from) boxes on the new transfer record?

I have a query that isolates the last location of the asset in a single record (linked as a button on the form), but am unclear on how to update the information from the query as default values on the form. When I set the default value of the form to "=[qryCurrent]![EmployeeNum]", all I get #Name? to display.
 
Take a look at the DLookUp function:
=DLookUp("EmployeeNum", "qryCurrent")

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Perfect, that was exactly what I was looking for PHV. Many thanks!

:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top