jhpccs
Posts: 25
|
| Posted: 03/15/2006, 12:46 AM |
|
This is really 2 problems.Before I bother support I thought I'd try here.
I am trying to change a link value or visible property in a grid according to a database value. using the before show event of the link.
The code is:
Function tblPage_Link1_BeforeShow(Sender) 'tblPage_Link1_BeforeShow @50-4F83B720
'Custom Code @58-73254650
' -------------------------
if tblPage.DataSource.Recordset.Fields("inedit") ="1" then
tblPage.Link1.Value =" Checked out"
end if
' -------------------------
'End Custom Code
problem 1:
Is even if I remove the If then statements and just have tblPage.Link1.Value =" Checked out" 'value = "1"
The link does not change values.
if I change it to:
tblPage.Link1.visible - False
Without the If then statement the links still show.
Problem 2
Involves the If Then statement.
The wrong values are being returned.
It seems as if it is not looking at the specified table.
If I enter a table that does not exist such as:
if tblPage.DataSource.Recordset.Fields("NOinedit") ="1" then
I do not get an error. I should since the field "Noinedit" does not exist.
I know the code is being used if I place a label and use it to debug by assigning a value of "Test" it shows up, If I misspell datasource as dtasource I get a error.
I have also tried CCGetValue still the same results.
Sorry if this is long.
Please Help!
Joe
|
 |
 |
Joe
|
| Posted: 03/24/2006, 10:23 PM |
|
I had hopes someone could help me?
|
|
|
 |
mrachow
Posts: 509
|
| Posted: 03/26/2006, 4:17 AM |
|
What maybe helps for visibility of the Link.
Have a look at the property Visible of the Link. Set it to dynamic.
_________________
Best regards,
Michael |
 |
 |
|