dhodgdon
Posts: 80
|
| Posted: 08/09/2004, 12:24 AM |
|
Using CCDLookUp to get a user name for a label complains that the value of the connection is a variable and undefined. The command being used in BeforeShow() is:
UserName.Value = CCDLookUp("name","users","userid=" & ccFAESurvey.ToSQL(CCGetUserID(),ccsInteger), ccFAESurvey)
Label: UserName
DB Field to return value of: name
Table: users
criteria: userid field based on the userID of login
connection: ccFAESurvey
I tried a DIM on the connection name with no difference.
All help appriciated.
_________________
Regards,
David Hodgdon
|
 |
 |
dhodgdon
Posts: 80
|
| Posted: 08/09/2004, 8:07 PM |
|
I found the answer in another entry. It is puzzling to me why the help documentation does not give the entire code entry necessary in the example.
http://forums.codecharge.com/posts.php?post_id=48549
_________________
Regards,
David Hodgdon
|
 |
 |
susan
|
| Posted: 11/03/2004, 11:22 AM |
|
Ahhhh the old quote thing. Thanks. This helped me as well
|
|
|
 |
smalloy
Posts: 107
|
| Posted: 11/05/2004, 8:08 AM |
|
Yes, I had the same issue and it is because the connection has not been instanciated. Here is the fix:
If your connection is Connection1
<Code>
Dim myconnection
SET myconnection = New clsDBConnection1
myconnection.open
Label1.value = CCDLookup("field", "table", "condition", myconnection )
</Code>
_________________
Anything can be done, just give me time and money. |
 |
 |
|