CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> Archive -> GotoCode Archive

 CCDLOOKUP syntax help

Print topic Send  topic

Author Message
Sharon Niles
Posted: 08/01/2003, 11:54 AM

Hi Everyone,
I'm trying to populate a field with a value from another table. The problem is in the WHERE portion of the formula. The editable grid has fields named Issue and IssText. Everytime an Issue is entered, I would like the IssText field to be filled in. The data comes from the Issue Table. This is what I have so far:

contract_File1.[IssText].Value = CCDLookUp ("IssText","Issue Table","Issue Table!Issue = Issue", DBTNR)

contract_File1.[IssText].Value is the text box. On the editable field, the Issue Box precedes IssText.

Issue Table contains the fields
Issue
IssText

Any help will be greatly appreciated.

Thanks,
Sharon

Blinky Bill
Posted: 08/03/2003, 5:50 AM

You don't state what language or database so I will assume it's asp and access database.

I will also Issue column in the Issue table is of int type

Dim MyIssueVar : MyIssueVar = 1

contract_File1.IssText.Value = CCDLookUp("IssText","[Issue Table]","Issue = " & MyIssueVar, DBTNR)

Note I have introduced a new var call MyIssueVar, this variable hold the ID you searching for.

Sharon Niles
Posted: 08/03/2003, 10:09 PM

Hi Blinky Bill. Thanks so much for your help. One quick question. The Issue is a date, not an integer. What would The following statement be for a date

Dim MyIssueVar : MyIssueVar = 1

Your help is appreciated.

Thank you,
Sharon Niles
Blinky Bill
Posted: 08/04/2003, 2:58 AM

Shazza, that's what we called Sharons is AU

for date and VBSCRIPT i always use the following format

Dim MyIssueVar : MyIssueVar = CDATE("20030801")

or

Dim MyIssueVar : MyIssueVar = CDATE("01/Aug/2003")

first option is preffered second is more readable

The reason for this is VBSCRIPT is not locale aware there INSIST on US date format, which gives the rest of the world the shits !

CDATE is a the CAST AS DATE function.


   


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

Web Database

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.