vroberts2
Posts: 3
|
| Posted: 11/09/2007, 11:50 AM |
|
I have a record page named SRO, with a connection named DBSRODB. The name of the source table for this page is SRO as well.
Main Table: SRO
Pri Key: AutoID
Linked field: sclientid
Lookup Table: Clients
Pri Key/Linked Field: AutoID
Field to show: Name
Here is what I thought should work, in the before show event:
SRO.Label1.Value = CCDLookUp("Name","Clients", "AutoID=" & SRO.sclientid.Value, DBSRODB)
If I use "AutoID=178" for instance, the code functions, but of course is not dynamic. Maybe the before show event happens to early for me to use the Value property of the sclientid form control. How can I reference the current recordset field value for sclientid?
|
 |
 |
Oper
Posts: 1195
|
| Posted: 11/09/2007, 12:48 PM |
|
What is SRO.sclientid.value? a form?
where is that Before SHow?
_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)
http://www.PremiumWebTemplate.com
Affiliation Web Site Templates
Please do backup first |
 |
 |
vroberts2
Posts: 3
|
| Posted: 11/09/2007, 1:49 PM |
|
Form.boundtextfield.value
SRO.sclientid.Value
Before show event function:
Function Page_BeforeShow(Sender) 'Page_BeforeShow @1-A1547E8B
'DLookup @17-960F73FF
SRO.Label1.Value = CCDLookUp("Name","Clients", "AutoID=" & SRO.sclientid.Value, DBSRODB)
'End DLookup
End Function 'Close Page_BeforeShow @1-54C34B28
|
 |
 |
Oper
Posts: 1195
|
| Posted: 11/10/2007, 3:59 AM |
|
use the Before show event of SRO.sclientid
not before showpage
_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)
http://www.PremiumWebTemplate.com
Affiliation Web Site Templates
Please do backup first |
 |
 |
vroberts2
Posts: 3
|
| Posted: 11/10/2007, 8:29 AM |
|
Thanks, that did the trick.
|
 |
 |
|