CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 How to use DLOOKUP

Print topic Send  topic

Author Message
mramirez18

Posts: 56
Posted: 05/30/2006, 7:42 PM

I need assistance with DLOOKUP, I have tried some of the examples and get it to work.

I have a label which is showing the ID, and i want the actual name showing rather than the ID.

Table licenseallocate_type
Field license_allocate_name

the primary key for this table is license_allocate_type_id

This is what I currently have:

DLookup @35-E3FFC1F4
License_Allocate_Type_Name.Value = CStr(CCDLookUp(License_Allocate_Name,LicenseAllocate_type,License_Allocate_Type_id,DBlicensemgr))
'End DLookup


I get the following error
Variable is undefined: 'License_Allocate_Name'

What is the best way to do a DLookup for such a scenario?
View profile  Send private message
marcwolf


Posts: 361
Posted: 05/30/2006, 11:35 PM

Hi There.

I think from looking at your code you will need to put the fieldsnames into a string

i.e.

DLookup @35-E3FFC1F4
License_Allocate_Type_Name.Value = CStr(CCDLookUp("License_Allocate_Name","LicenseAllocate_type",
"License_Allocate_Type_id = '" & License_Allocate_Type_Name.Value & "'" ,DBlicensemgr))
'End DLookup

I can see you are using the ACTION functionality so just put "" around your fields.

Now - from what I am reading..

The field from the table you want to return is License_Allocate_Name
The Table is LicenseAllocate_type

And the criteria is License_Allocate_Type_id equalling the inital value of
License_Allocate_Type_Name.Value

Let me know if this is corrent and it is working.

Personally I prefer to use the Form BeforeShow to do these substitutions.


Take Care

Dave


_________________
' Coding Coding Coding
Keep Those Keyboards Coding.
Raw Code!!!!!!!
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.