[AccessD] Getting Desperate - Apologies for the OT message

Christopher Hawkins clh at christopherhawkins.com
Mon Aug 18 13:32:21 CDT 2003


Nice!  Thanks for sharing.

I hope we get a chance to work together on someting.

-C-

---- Original Message ----
From: DWUTKA at marlow.com
To: accessd at databaseadvisors.com, 
Subject: RE: [AccessD] Getting Desperate - Apologies for the OT
message
Date: Mon, 18 Aug 2003 12:49:56 -0500

>I pasted the code below for the class module that was used for the
><%=dn.HTML("MyFieldName")%> statement in asp.
>
>It was classic ASP, with the code below in a VB 6.0 .dll.  There 
>were other
>classes involved, but I'm sure you'll get the gist of it.  I also 
>stripped
>most of the SQL statement on the bottom function since it was pretty 
>big!
>
>Drew
>
>-----Original Message-----
>From: Christopher Hawkins [mailto:clh at christopherhawkins.com]
>Sent: Friday, August 15, 2003 11:10 PM
>To: accessd at databaseadvisors.com
>Subject: RE: [AccessD] Getting Desperate - Apologies for the OT 
>message
>
>
>That's very clever.  I'd love to see that code.
>
>Was this ASP.NET or classic ASP?  
>
>-C-
>
>Option Explicit
>Public CaseNumber As String
>Public Mode As String
>Dim Fields As Collection
>Dim FSettings As Collection
>
>Function HTML(strField As String)
>Dim fs As FieldSetting
>Dim strTemp
>Set fs = FSettings(strField)
>Select Case Mode
>    Case "View"
>        strTemp = Value(strField)
>        Select Case fs.FieldType
>            Case "CheckBox"
>                HTML = strTemp
>            Case Else
>                If IsNull(strTemp) Or strTemp = "" Then
>                    strTemp = " "
>                Else
>                    strTemp = "<b>" & strTemp & "</b>"
>                End If
>                HTML = strTemp
>        End Select
>    Case "Edit"
>        Select Case fs.FieldType
>            Case "CheckBox"
>                HTML = Value(strField)
>            Case "Text"
>                If fs.Title = "" Or IsNull(fs.Title) Then
>                    HTML = "<input type=""text"" value=""" & 
>Value(strField)
>& """ size=""" & fs.Size & """ name=""" & fs.FieldName & """>"
>                Else
>                    HTML = "<input type=""text"" title=""" & 
>fs.Title & """
>value=""" & Value(strField) & """ size=""" & fs.Size & """ name=""" &
>fs.FieldName & """>"
>                End If
>            Case "Combo"
>                If fs.ComboClass <> "" And IsNull(fs.ComboClass) = 
>False
>Then
>                    HTML = GetSelectStatement(fs.ComboClass, 
>fs.FieldName,
>fs.Size, Value(strField))
>                End If
>            Case "Memo"
>                HTML = "<textarea name=""" & fs.FieldName & """ 
>cols=""" &
>fs.Size & """ rows=""" & fs.MatchingField & """>" & Value(strField) &
>"



More information about the AccessD mailing list