robn
Posts: 70
|
| Posted: 08/03/2006, 3:28 AM |
|
Hi
I've hidden Panels many times when using a fixed value (i.e. If tblOpportunitie.ProjAssessWeight.Value = 1 then) which have worked fine but now I am trying to retrieve a value from the database which can be changed by the user. The code I have created looks like this.
If tblOpportunitie.ProjAssessWeight.Value < CCDLookUp("PreSetLimit","tblPreSetLimit","PLID=" & DBeqmssso_001.ToSQL(tblOpportunitie.PreSetLimit.Value,ccsInteger), DBeqmssso_001) Then
tblOpportunitie.Panel_projectAssessment.Visible = false
End if
This produced a Type Mismatch error
also I tried pulling the preset value from the database and placing it in a text box so I could use the following code
If tblOpportunitie.ProjAssessWeight.Value < tblOpportunitie.PreSetLimit.Value Then
tblOpportunitie.Panel_projectAssessment.Visible = false
Which runs but seems to ignore the setting (doesn't matter if its greater than the preset value or not the panel is still displayed.
Any help on how I can achieve this would be much appriciated.
thanks in advance
Rob
|