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

DLookup Function

Status
Not open for further replies.

masiwan

Vendor
Feb 20, 2006
37
UG
Is there any way to use the DLOOKUP function using Access projects? . With Access MDB you could use DLOOKUP function with ease by passing a parameter value captured on the form to the access database table or query and obtain results,

It appears now it is no longer possible because the parameter value passed from the form using: Forms!formname!form control(value) can not be interpreted by SQL server that keeps the data in its tables.
 

Not sure I'm clear on exactly what you're trying to do (open report based on sproc?) Your report has an input parameters property in which you specify the parameters in your sproc and set them equal to the values on the form. For example:

@Variable1 varchar(10) = forms![frmMyForm]![FieldName],@Variable2 datetime = ...

 
For example I have a form and on it I placed a combobox that selects account numbers from a table.
I have another field on the same table that displays the account tittle of the selected account number, using a DLOOKUP function.

as follows:

in the data source area of the field, I put:
DLOOKUP("tittle","chartofaccounts","account=Forms!displayform!accountselected")

where:

chartofaccounts is a table containing account numbers, and displayform is the form on which the controls have been put and accountselected is the combobox name, used to select an account

I already know about the parameters tab and have used it, but does not apply in this situation. The form is not neccessarily bound to any record set

Thanxs every body






 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top