Results 1 to 7 of 7

Thread: Boolean text, etc..

  1. #1
    mark T Guest

    Boolean text, etc..

    OK, I'm hacking code provided in samples to attempt to get it to do what I want it to do. Here's what I am attempting to do:

    Display a grid of items which, when an items is clicked, a new screen displays the details about that item in a custom manner:

    I've got MOST of this working, BUT, I cannot get the boolean text to work right. What I'd like to do is have an image appear, in place of True, and leave the field blank if it is false.

    Here is my *hacked* code so far...

    ----------------------------------------------

    <!--ASP-db-->
    <HTML>
    <HEAD><title>ASP-db MH-Bool Form</title>
    </HEAD>


    <BODY BGCOLOR=&#34;A0E0A0&#34; TEXT=Black LINK=BLUE ALINK=RED VLINK=BLUE>
    <FONT FACE=&#34;Arial,Helvetica&#34; Color=Black Size=3>

    <CENTER><B>Welcome to the ASP-db™ Bool Custom Form Demo Page.</B><P>

    This example shows how you can show a bool on a Custom Form.
    <HR WIDTH=66%>

    <%
    Set MyDb = Server.CreateObject(&#34;AspDB.Pro&#34
    MyDb.dbUnit = 14
    Mydb.dbMDB=Server.MapPath(&#34;plants.mdb&#34

    MyDb.dbSQL = &#34;Select * FROM Inventory&#34;
    MyDb.dbMode = &#34;Both&#34;
    MyDb.DbGridInc = &#34;10&#34;
    MyDb.dBColor = &#34;7&#34;
    MyDb.dbGridTableTag = &#34;border=2 cellspacing=2 cellpadding=3&#34;

    Mydb.dbGridDisplayFlds = &#34;Common_Name,Latin,summary&#34;

    MyDb.dbFormDisplayFlds = &#34;-1&#34;
    Mydb.dbExportFlds = &#34;Category,Common_Name,Latin,altname,summary,De tail,New&#34;

    &#39; Note: dbFilterFlds must use the RENAMED field name (not the ORIGINAL field name)!
    &#39; MyDb.dbFilterFlds =&#34;Name, Human?&#34;

    &#39; Mydb.dbFilterDropFlds=&#34;Name,,Table1,Name;&#34;

    &#39; Mydb.dbFilterParams = &#34;DropButtonText=none&#34;

    MyDb.dbImageDir=&#34;/aspdb/images/&#34;
    Mydb.dbNavigation=&#34;bottom&#34;
    Mydb.dbNavigationItem=&#34;top, bottom, next, prev, filter, download&#34;
    Mydb.dbNavigationIcon=&#34;std&#34;

    MyDb.aspDBPro

    &#39; Show the CUSTOM FORM now ?
    if UCASE(Mydb.dbLastScreen) = &#34;FORM&#34; then
    response.write(&#34;<CENTER><TABLE BORDER=1 WIDTH=500><TR><TD><font face=Arial><font size=+1><B>&#34
    response.write(&#34;&#34
    response.write(&#34;&#34; & Session(&#34;ASPdb_14_Common_Name&#34 & &#34;</b></font><hR>&#34
    response.write(&#34;<table width=480><tr><TD><i> &#34; & Session(&#34;ASPdb_14_Latin&#34 & &#34;</i></td><td>&nbsp;</td><TD>&#34
    response.write(&#34;&#34; & Session(&#34;ASPdb_14_summary&#34 & &#34;</td></tr></table>&#34
    response.write(&#34;<img align=right src=images/&#34; & Session(&#34;ASPdb_14_image&#34 & &#34;>&#34
    response.write(&#34;&#34; & Session(&#34;ASPdb_14_Detail&#34 & &#34;<BR>&#34
    if UCASE(Session(&#34;ASPdb_14_New&#34) = &#34;True&#34; then
    response.write(&#34;<b>New:</b><center><img src=images/checkbox.gif></center>&#34
    else
    response.write(&#34;<b>New:</b> NO&#34
    end if

    response.write(&#34;</TD></TR></TABLE></CENTER>&#34
    end if

    %>
    </td></TR></TABLE>
    </BODY>
    </HTML>
    ---------------------------------------

    Once I set this up, I have to access specific categories of items using a hyperlink to bring me to the main list. Also, I need to limit the main list to a specific category at any one time.

    Then, I should have just about everything I need.

    Thanks for helping this ASPDB and VBscript/ASP newbie!

  2. #2
    MarkT Guest

    Boolean text, etc.. (reply)

    As a quick follow-up...

    Do I need to have the filterfld set in order for this to work properly? I really am a bit confused on that area of aspdb. Also, the particular site this is for would have 6-8 of these boolean fields. Is that too uch to ask?



    ------------
    mark T at 12/14/99 4:06:38 PM

    OK, I&#39;m hacking code provided in samples to attempt to get it to do what I want it to do. Here&#39;s what I am attempting to do:

    Display a grid of items which, when an items is clicked, a new screen displays the details about that item in a custom manner:

    I&#39;ve got MOST of this working, BUT, I cannot get the boolean text to work right. What I&#39;d like to do is have an image appear, in place of True, and leave the field blank if it is false.

    Here is my *hacked* code so far...

    ----------------------------------------------

    <!--ASP-db-->
    <HTML>
    <HEAD><title>ASP-db MH-Bool Form</title>
    </HEAD>


    <BODY BGCOLOR=&#34;A0E0A0&#34; TEXT=Black LINK=BLUE ALINK=RED VLINK=BLUE>
    <FONT FACE=&#34;Arial,Helvetica&#34; Color=Black Size=3>

    <CENTER><B>Welcome to the ASP-db™ Bool Custom Form Demo Page.</B><P>

    This example shows how you can show a bool on a Custom Form.
    <HR WIDTH=66%>

    <%
    Set MyDb = Server.CreateObject(&#34;AspDB.Pro&#34
    MyDb.dbUnit = 14
    Mydb.dbMDB=Server.MapPath(&#34;plants.mdb&#34

    MyDb.dbSQL = &#34;Select * FROM Inventory&#34;
    MyDb.dbMode = &#34;Both&#34;
    MyDb.DbGridInc = &#34;10&#34;
    MyDb.dBColor = &#34;7&#34;
    MyDb.dbGridTableTag = &#34;border=2 cellspacing=2 cellpadding=3&#34;

    Mydb.dbGridDisplayFlds = &#34;Common_Name,Latin,summary&#34;

    MyDb.dbFormDisplayFlds = &#34;-1&#34;
    Mydb.dbExportFlds = &#34;Category,Common_Name,Latin,altname,summary,De tail,New&#34;

    &#39; Note: dbFilterFlds must use the RENAMED field name (not the ORIGINAL field name)!
    &#39; MyDb.dbFilterFlds =&#34;Name, Human?&#34;

    &#39; Mydb.dbFilterDropFlds=&#34;Name,,Table1,Name;&#34;

    &#39; Mydb.dbFilterParams = &#34;DropButtonText=none&#34;

    MyDb.dbImageDir=&#34;/aspdb/images/&#34;
    Mydb.dbNavigation=&#34;bottom&#34;
    Mydb.dbNavigationItem=&#34;top, bottom, next, prev, filter, download&#34;
    Mydb.dbNavigationIcon=&#34;std&#34;

    MyDb.aspDBPro

    &#39; Show the CUSTOM FORM now ?
    if UCASE(Mydb.dbLastScreen) = &#34;FORM&#34; then
    response.write(&#34;<CENTER><TABLE BORDER=1 WIDTH=500><TR><TD><font face=Arial><font size=+1><B>&#34
    response.write(&#34;&#34
    response.write(&#34;&#34; & Session(&#34;ASPdb_14_Common_Name&#34 & &#34;</b></font><hR>&#34
    response.write(&#34;<table width=480><tr><TD><i> &#34; & Session(&#34;ASPdb_14_Latin&#34 & &#34;</i></td><td> </td><TD>&#34
    response.write(&#34;&#34; & Session(&#34;ASPdb_14_summary&#34 & &#34;</td></tr></table>&#34
    response.write(&#34;<img align=right src=images/&#34; & Session(&#34;ASPdb_14_image&#34 & &#34;>&#34
    response.write(&#34;&#34; & Session(&#34;ASPdb_14_Detail&#34 & &#34;<BR>&#34
    if UCASE(Session(&#34;ASPdb_14_New&#34) = &#34;True&#34; then
    response.write(&#34;<b>New:</b><center><img src=images/checkbox.gif></center>&#34
    else
    response.write(&#34;<b>New:</b> NO&#34
    end if

    response.write(&#34;</TD></TR></TABLE></CENTER>&#34
    end if

    %>
    </td></TR></TABLE>
    </BODY>
    </HTML>
    ---------------------------------------

    Once I set this up, I have to access specific categories of items using a hyperlink to bring me to the main list. Also, I need to limit the main list to a specific category at any one time.

    Then, I should have just about everything I need.

    Thanks for helping this ASPDB and VBscript/ASP newbie!

  3. #3
    Mark H. Guest

    Boolean text, etc.. (reply)

    Mark,

    You are missing a dbBoolText statement, something like this:

    MyDb.dbBoolText=&#34;<IMG SRC=images/checkbox.gif>,(blank)&#34;

    Mark H.

    ------------
    MarkT at 12/14/99 4:29:20 PM

    As a quick follow-up...

    Do I need to have the filterfld set in order for this to work properly? I really am a bit confused on that area of aspdb. Also, the particular site this is for would have 6-8 of these boolean fields. Is that too uch to ask?



    ------------
    mark T at 12/14/99 4:06:38 PM

    OK, I&#39;m hacking code provided in samples to attempt to get it to do what I want it to do. Here&#39;s what I am attempting to do:

    Display a grid of items which, when an items is clicked, a new screen displays the details about that item in a custom manner:

    I&#39;ve got MOST of this working, BUT, I cannot get the boolean text to work right. What I&#39;d like to do is have an image appear, in place of True, and leave the field blank if it is false.

    Here is my *hacked* code so far...

    ----------------------------------------------

    <!--ASP-db-->
    <HTML>
    <HEAD><title>ASP-db MH-Bool Form</title>
    </HEAD>


    <BODY BGCOLOR=&#34;A0E0A0&#34; TEXT=Black LINK=BLUE ALINK=RED VLINK=BLUE>
    <FONT FACE=&#34;Arial,Helvetica&#34; Color=Black Size=3>

    <CENTER><B>Welcome to the ASP-db™ Bool Custom Form Demo Page.</B><P>

    This example shows how you can show a bool on a Custom Form.
    <HR WIDTH=66%>

    <%
    Set MyDb = Server.CreateObject(&#34;AspDB.Pro&#34
    MyDb.dbUnit = 14
    Mydb.dbMDB=Server.MapPath(&#34;plants.mdb&#34

    MyDb.dbSQL = &#34;Select * FROM Inventory&#34;
    MyDb.dbMode = &#34;Both&#34;
    MyDb.DbGridInc = &#34;10&#34;
    MyDb.dBColor = &#34;7&#34;
    MyDb.dbGridTableTag = &#34;border=2 cellspacing=2 cellpadding=3&#34;

    Mydb.dbGridDisplayFlds = &#34;Common_Name,Latin,summary&#34;

    MyDb.dbFormDisplayFlds = &#34;-1&#34;
    Mydb.dbExportFlds = &#34;Category,Common_Name,Latin,altname,summary,De tail,New&#34;

    &#39; Note: dbFilterFlds must use the RENAMED field name (not the ORIGINAL field name)!
    &#39; MyDb.dbFilterFlds =&#34;Name, Human?&#34;

    &#39; Mydb.dbFilterDropFlds=&#34;Name,,Table1,Name;&#34;

    &#39; Mydb.dbFilterParams = &#34;DropButtonText=none&#34;

    MyDb.dbImageDir=&#34;/aspdb/images/&#34;
    Mydb.dbNavigation=&#34;bottom&#34;
    Mydb.dbNavigationItem=&#34;top, bottom, next, prev, filter, download&#34;
    Mydb.dbNavigationIcon=&#34;std&#34;

    MyDb.aspDBPro

    &#39; Show the CUSTOM FORM now ?
    if UCASE(Mydb.dbLastScreen) = &#34;FORM&#34; then
    response.write(&#34;<CENTER><TABLE BORDER=1 WIDTH=500><TR><TD><font face=Arial><font size=+1><B>&#34
    response.write(&#34;&#34
    response.write(&#34;&#34; & Session(&#34;ASPdb_14_Common_Name&#34 & &#34;</b></font><hR>&#34
    response.write(&#34;<table width=480><tr><TD><i> &#34; & Session(&#34;ASPdb_14_Latin&#34 & &#34;</i></td><td> </td><TD>&#34
    response.write(&#34;&#34; & Session(&#34;ASPdb_14_summary&#34 & &#34;</td></tr></table>&#34
    response.write(&#34;<img align=right src=images/&#34; & Session(&#34;ASPdb_14_image&#34 & &#34;>&#34
    response.write(&#34;&#34; & Session(&#34;ASPdb_14_Detail&#34 & &#34;<BR>&#34
    if UCASE(Session(&#34;ASPdb_14_New&#34) = &#34;True&#34; then
    response.write(&#34;<b>New:</b><center><img src=images/checkbox.gif></center>&#34
    else
    response.write(&#34;<b>New:</b> NO&#34
    end if

    response.write(&#34;</TD></TR></TABLE></CENTER>&#34
    end if

    %>
    </td></TR></TABLE>
    </BODY>
    </HTML>
    ---------------------------------------

    Once I set this up, I have to access specific categories of items using a hyperlink to bring me to the main list. Also, I need to limit the main list to a specific category at any one time.

    Then, I should have just about everything I need.

    Thanks for helping this ASPDB and VBscript/ASP newbie!

  4. #4
    mark t Guest

    Boolean text, etc.. (reply)


    Thanks I forgot that line. However, even with the dbbooltext field added, the image doesn&#39;t display. Could it be that it doesn&#39;t work when displaying the results on another screen (one screen being the grid, the other being the form?)
    Or could

    MyDb.dbFormDisplayFlds = &#34;-1&#34;

    interfere with the dbbootext?


    ------------
    Mark H. at 12/14/99 5:08:39 PM

    Mark,

    You are missing a dbBoolText statement, something like this:

    MyDb.dbBoolText=&#34;<IMG SRC=images/checkbox.gif>,(blank)&#34;

    Mark H.

    ------------
    MarkT at 12/14/99 4:29:20 PM

    As a quick follow-up...

    Do I need to have the filterfld set in order for this to work properly? I really am a bit confused on that area of aspdb. Also, the particular site this is for would have 6-8 of these boolean fields. Is that too uch to ask?



    ------------
    mark T at 12/14/99 4:06:38 PM

    OK, I&#39;m hacking code provided in samples to attempt to get it to do what I want it to do. Here&#39;s what I am attempting to do:

    Display a grid of items which, when an items is clicked, a new screen displays the details about that item in a custom manner:

    I&#39;ve got MOST of this working, BUT, I cannot get the boolean text to work right. What I&#39;d like to do is have an image appear, in place of True, and leave the field blank if it is false.

    Here is my *hacked* code so far...

    ----------------------------------------------

    <!--ASP-db-->
    <HTML>
    <HEAD><title>ASP-db MH-Bool Form</title>
    </HEAD>


    <BODY BGCOLOR=&#34;A0E0A0&#34; TEXT=Black LINK=BLUE ALINK=RED VLINK=BLUE>
    <FONT FACE=&#34;Arial,Helvetica&#34; Color=Black Size=3>

    <CENTER><B>Welcome to the ASP-db™ Bool Custom Form Demo Page.</B><P>

    This example shows how you can show a bool on a Custom Form.
    <HR WIDTH=66%>

    <%
    Set MyDb = Server.CreateObject(&#34;AspDB.Pro&#34
    MyDb.dbUnit = 14
    Mydb.dbMDB=Server.MapPath(&#34;plants.mdb&#34

    MyDb.dbSQL = &#34;Select * FROM Inventory&#34;
    MyDb.dbMode = &#34;Both&#34;
    MyDb.DbGridInc = &#34;10&#34;
    MyDb.dBColor = &#34;7&#34;
    MyDb.dbGridTableTag = &#34;border=2 cellspacing=2 cellpadding=3&#34;

    Mydb.dbGridDisplayFlds = &#34;Common_Name,Latin,summary&#34;

    MyDb.dbFormDisplayFlds = &#34;-1&#34;
    Mydb.dbExportFlds = &#34;Category,Common_Name,Latin,altname,summary,De tail,New&#34;

    &#39; Note: dbFilterFlds must use the RENAMED field name (not the ORIGINAL field name)!
    &#39; MyDb.dbFilterFlds =&#34;Name, Human?&#34;

    &#39; Mydb.dbFilterDropFlds=&#34;Name,,Table1,Name;&#34;

    &#39; Mydb.dbFilterParams = &#34;DropButtonText=none&#34;

    MyDb.dbImageDir=&#34;/aspdb/images/&#34;
    Mydb.dbNavigation=&#34;bottom&#34;
    Mydb.dbNavigationItem=&#34;top, bottom, next, prev, filter, download&#34;
    Mydb.dbNavigationIcon=&#34;std&#34;

    MyDb.aspDBPro

    &#39; Show the CUSTOM FORM now ?
    if UCASE(Mydb.dbLastScreen) = &#34;FORM&#34; then
    response.write(&#34;<CENTER><TABLE BORDER=1 WIDTH=500><TR><TD><font face=Arial><font size=+1><B>&#34
    response.write(&#34;&#34
    response.write(&#34;&#34; & Session(&#34;ASPdb_14_Common_Name&#34 & &#34;</b></font><hR>&#34
    response.write(&#34;<table width=480><tr><TD><i> &#34; & Session(&#34;ASPdb_14_Latin&#34 & &#34;</i></td><td> </td><TD>&#34
    response.write(&#34;&#34; & Session(&#34;ASPdb_14_summary&#34 & &#34;</td></tr></table>&#34
    response.write(&#34;<img align=right src=images/&#34; & Session(&#34;ASPdb_14_image&#34 & &#34;>&#34
    response.write(&#34;&#34; & Session(&#34;ASPdb_14_Detail&#34 & &#34;<BR>&#34
    if UCASE(Session(&#34;ASPdb_14_New&#34) = &#34;True&#34; then
    response.write(&#34;<b>New:</b><center><img src=images/checkbox.gif></center>&#34
    else
    response.write(&#34;<b>New:</b> NO&#34
    end if

    response.write(&#34;</TD></TR></TABLE></CENTER>&#34
    end if

    %>
    </td></TR></TABLE>
    </BODY>
    </HTML>
    ---------------------------------------

    Once I set this up, I have to access specific categories of items using a hyperlink to bring me to the main list. Also, I need to limit the main list to a specific category at any one time.

    Then, I should have just about everything I need.

    Thanks for helping this ASPDB and VBscript/ASP newbie!

  5. #5
    Mark T Guest

    Boolean text, etc.. (reply)


    Well, I commented out this line:

    MyDb.dbFormDisplayFlds = &#34;-1&#34;

    and a standard form displayed, with the animated check mark in it.
    The problem is that I need a custom form. So, how to get around this?

    ------------
    mark t at 12/14/99 5:52:05 PM


    Thanks I forgot that line. However, even with the dbbooltext field added, the image doesn&#39;t display. Could it be that it doesn&#39;t work when displaying the results on another screen (one screen being the grid, the other being the form?)
    Or could

    MyDb.dbFormDisplayFlds = &#34;-1&#34;

    interfere with the dbbootext?


    ------------
    Mark H. at 12/14/99 5:08:39 PM

    Mark,

    You are missing a dbBoolText statement, something like this:

    MyDb.dbBoolText=&#34;<IMG SRC=images/checkbox.gif>,(blank)&#34;

    Mark H.

    ------------
    MarkT at 12/14/99 4:29:20 PM

    As a quick follow-up...

    Do I need to have the filterfld set in order for this to work properly? I really am a bit confused on that area of aspdb. Also, the particular site this is for would have 6-8 of these boolean fields. Is that too uch to ask?



    ------------
    mark T at 12/14/99 4:06:38 PM

    OK, I&#39;m hacking code provided in samples to attempt to get it to do what I want it to do. Here&#39;s what I am attempting to do:

    Display a grid of items which, when an items is clicked, a new screen displays the details about that item in a custom manner:

    I&#39;ve got MOST of this working, BUT, I cannot get the boolean text to work right. What I&#39;d like to do is have an image appear, in place of True, and leave the field blank if it is false.

    Here is my *hacked* code so far...

    ----------------------------------------------

    <!--ASP-db-->
    <HTML>
    <HEAD><title>ASP-db MH-Bool Form</title>
    </HEAD>


    <BODY BGCOLOR=&#34;A0E0A0&#34; TEXT=Black LINK=BLUE ALINK=RED VLINK=BLUE>
    <FONT FACE=&#34;Arial,Helvetica&#34; Color=Black Size=3>

    <CENTER><B>Welcome to the ASP-db™ Bool Custom Form Demo Page.</B><P>

    This example shows how you can show a bool on a Custom Form.
    <HR WIDTH=66%>

    <%
    Set MyDb = Server.CreateObject(&#34;AspDB.Pro&#34
    MyDb.dbUnit = 14
    Mydb.dbMDB=Server.MapPath(&#34;plants.mdb&#34

    MyDb.dbSQL = &#34;Select * FROM Inventory&#34;
    MyDb.dbMode = &#34;Both&#34;
    MyDb.DbGridInc = &#34;10&#34;
    MyDb.dBColor = &#34;7&#34;
    MyDb.dbGridTableTag = &#34;border=2 cellspacing=2 cellpadding=3&#34;

    Mydb.dbGridDisplayFlds = &#34;Common_Name,Latin,summary&#34;

    MyDb.dbFormDisplayFlds = &#34;-1&#34;
    Mydb.dbExportFlds = &#34;Category,Common_Name,Latin,altname,summary,De tail,New&#34;

    &#39; Note: dbFilterFlds must use the RENAMED field name (not the ORIGINAL field name)!
    &#39; MyDb.dbFilterFlds =&#34;Name, Human?&#34;

    &#39; Mydb.dbFilterDropFlds=&#34;Name,,Table1,Name;&#34;

    &#39; Mydb.dbFilterParams = &#34;DropButtonText=none&#34;

    MyDb.dbImageDir=&#34;/aspdb/images/&#34;
    Mydb.dbNavigation=&#34;bottom&#34;
    Mydb.dbNavigationItem=&#34;top, bottom, next, prev, filter, download&#34;
    Mydb.dbNavigationIcon=&#34;std&#34;

    MyDb.aspDBPro

    &#39; Show the CUSTOM FORM now ?
    if UCASE(Mydb.dbLastScreen) = &#34;FORM&#34; then
    response.write(&#34;<CENTER><TABLE BORDER=1 WIDTH=500><TR><TD><font face=Arial><font size=+1><B>&#34
    response.write(&#34;&#34
    response.write(&#34;&#34; & Session(&#34;ASPdb_14_Common_Name&#34 & &#34;</b></font><hR>&#34
    response.write(&#34;<table width=480><tr><TD><i> &#34; & Session(&#34;ASPdb_14_Latin&#34 & &#34;</i></td><td> </td><TD>&#34
    response.write(&#34;&#34; & Session(&#34;ASPdb_14_summary&#34 & &#34;</td></tr></table>&#34
    response.write(&#34;<img align=right src=images/&#34; & Session(&#34;ASPdb_14_image&#34 & &#34;>&#34
    response.write(&#34;&#34; & Session(&#34;ASPdb_14_Detail&#34 & &#34;<BR>&#34
    if UCASE(Session(&#34;ASPdb_14_New&#34) = &#34;True&#34; then
    response.write(&#34;<b>New:</b><center><img src=images/checkbox.gif></center>&#34
    else
    response.write(&#34;<b>New:</b> NO&#34
    end if

    response.write(&#34;</TD></TR></TABLE></CENTER>&#34
    end if

    %>
    </td></TR></TABLE>
    </BODY>
    </HTML>
    ---------------------------------------

    Once I set this up, I have to access specific categories of items using a hyperlink to bring me to the main list. Also, I need to limit the main list to a specific category at any one time.

    Then, I should have just about everything I need.

    Thanks for helping this ASPDB and VBscript/ASP newbie!

  6. #6
    Mark H. Guest

    Boolean text, etc.. (reply)

    Mark,
    dbBoolText is explained in the manual at:
    http://www.aspdb.com/docs/aspdb.htm
    plus there are about 200 programming examples to help give you ideas.
    &#34;BoolText&#34; on a custom form is covered in Programming Example D59.
    Go to D59 and drill down on one of the records to see the custom Form.
    The source code is provided at the bottom.
    That will show you what to do. I am assuming you know how to use HTML
    to display a graphic.
    Mark H.

    ------------
    Mark T at 12/14/99 5:57:49 PM


    Well, I commented out this line:

    MyDb.dbFormDisplayFlds = &#34;-1&#34;

    and a standard form displayed, with the animated check mark in it.
    The problem is that I need a custom form. So, how to get around this?

    ------------
    mark t at 12/14/99 5:52:05 PM


    Thanks I forgot that line. However, even with the dbbooltext field added, the image doesn&#39;t display. Could it be that it doesn&#39;t work when displaying the results on another screen (one screen being the grid, the other being the form?)
    Or could

    MyDb.dbFormDisplayFlds = &#34;-1&#34;

    interfere with the dbbootext?


    ------------
    Mark H. at 12/14/99 5:08:39 PM

    Mark,

    You are missing a dbBoolText statement, something like this:

    MyDb.dbBoolText=&#34;<IMG SRC=images/checkbox.gif>,(blank)&#34;

    Mark H.

    ------------
    MarkT at 12/14/99 4:29:20 PM

    As a quick follow-up...

    Do I need to have the filterfld set in order for this to work properly? I really am a bit confused on that area of aspdb. Also, the particular site this is for would have 6-8 of these boolean fields. Is that too uch to ask?



    ------------
    mark T at 12/14/99 4:06:38 PM

    OK, I&#39;m hacking code provided in samples to attempt to get it to do what I want it to do. Here&#39;s what I am attempting to do:

    Display a grid of items which, when an items is clicked, a new screen displays the details about that item in a custom manner:

    I&#39;ve got MOST of this working, BUT, I cannot get the boolean text to work right. What I&#39;d like to do is have an image appear, in place of True, and leave the field blank if it is false.

    Here is my *hacked* code so far...

    ----------------------------------------------

    <!--ASP-db-->
    <HTML>
    <HEAD><title>ASP-db MH-Bool Form</title>
    </HEAD>


    <BODY BGCOLOR=&#34;A0E0A0&#34; TEXT=Black LINK=BLUE ALINK=RED VLINK=BLUE>
    <FONT FACE=&#34;Arial,Helvetica&#34; Color=Black Size=3>

    <CENTER><B>Welcome to the ASP-db™ Bool Custom Form Demo Page.</B><P>

    This example shows how you can show a bool on a Custom Form.
    <HR WIDTH=66%>

    <%
    Set MyDb = Server.CreateObject(&#34;AspDB.Pro&#34
    MyDb.dbUnit = 14
    Mydb.dbMDB=Server.MapPath(&#34;plants.mdb&#34

    MyDb.dbSQL = &#34;Select * FROM Inventory&#34;
    MyDb.dbMode = &#34;Both&#34;
    MyDb.DbGridInc = &#34;10&#34;
    MyDb.dBColor = &#34;7&#34;
    MyDb.dbGridTableTag = &#34;border=2 cellspacing=2 cellpadding=3&#34;

    Mydb.dbGridDisplayFlds = &#34;Common_Name,Latin,summary&#34;

    MyDb.dbFormDisplayFlds = &#34;-1&#34;
    Mydb.dbExportFlds = &#34;Category,Common_Name,Latin,altname,summary,De tail,New&#34;

    &#39; Note: dbFilterFlds must use the RENAMED field name (not the ORIGINAL field name)!
    &#39; MyDb.dbFilterFlds =&#34;Name, Human?&#34;

    &#39; Mydb.dbFilterDropFlds=&#34;Name,,Table1,Name;&#34;

    &#39; Mydb.dbFilterParams = &#34;DropButtonText=none&#34;

    MyDb.dbImageDir=&#34;/aspdb/images/&#34;
    Mydb.dbNavigation=&#34;bottom&#34;
    Mydb.dbNavigationItem=&#34;top, bottom, next, prev, filter, download&#34;
    Mydb.dbNavigationIcon=&#34;std&#34;

    MyDb.aspDBPro

    &#39; Show the CUSTOM FORM now ?
    if UCASE(Mydb.dbLastScreen) = &#34;FORM&#34; then
    response.write(&#34;<CENTER><TABLE BORDER=1 WIDTH=500><TR><TD><font face=Arial><font size=+1><B>&#34
    response.write(&#34;&#34
    response.write(&#34;&#34; & Session(&#34;ASPdb_14_Common_Name&#34 & &#34;</b></font><hR>&#34
    response.write(&#34;<table width=480><tr><TD><i> &#34; & Session(&#34;ASPdb_14_Latin&#34 & &#34;</i></td><td> </td><TD>&#34
    response.write(&#34;&#34; & Session(&#34;ASPdb_14_summary&#34 & &#34;</td></tr></table>&#34
    response.write(&#34;<img align=right src=images/&#34; & Session(&#34;ASPdb_14_image&#34 & &#34;>&#34
    response.write(&#34;&#34; & Session(&#34;ASPdb_14_Detail&#34 & &#34;<BR>&#34
    if UCASE(Session(&#34;ASPdb_14_New&#34) = &#34;True&#34; then
    response.write(&#34;<b>New:</b><center><img src=images/checkbox.gif></center>&#34
    else
    response.write(&#34;<b>New:</b> NO&#34
    end if

    response.write(&#34;</TD></TR></TABLE></CENTER>&#34
    end if

    %>
    </td></TR></TABLE>
    </BODY>
    </HTML>
    ---------------------------------------

    Once I set this up, I have to access specific categories of items using a hyperlink to bring me to the main list. Also, I need to limit the main list to a specific category at any one time.

    Then, I should have just about everything I need.

    Thanks for helping this ASPDB and VBscript/ASP newbie!

  7. #7
    Mark t Guest

    Boolean text, etc.. (reply)


    Mark,

    As I said in my previous message, the dbbooltext works FINE in a standard form or grid. But, when I attempt to make use of it in a custom form layout it just doesn&#39;t seem to work. And yes, I know how to put an image on a web page in html. While I only manage several thousand web pages, and do NOT know databases or much ASP as yet (I just moved the site to an NT server a couple months ago and am still learning the differences of NT compared to Linux.
    I&#39;ve looked at several dozen of the examples, and many of them seem to work fine, but this Image one is messing things up for me. I can get an image which I call in the database to display fine.

    ------------
    Mark H. at 12/14/99 8:01:03 PM

    Mark,
    dbBoolText is explained in the manual at:
    http://www.aspdb.com/docs/aspdb.htm
    plus there are about 200 programming examples to help give you ideas.
    &#34;BoolText&#34; on a custom form is covered in Programming Example D59.
    Go to D59 and drill down on one of the records to see the custom Form.
    The source code is provided at the bottom.
    That will show you what to do. I am assuming you know how to use HTML
    to display a graphic.
    Mark H.

    ------------
    Mark T at 12/14/99 5:57:49 PM


    Well, I commented out this line:

    MyDb.dbFormDisplayFlds = &#34;-1&#34;

    and a standard form displayed, with the animated check mark in it.
    The problem is that I need a custom form. So, how to get around this?

    ------------
    mark t at 12/14/99 5:52:05 PM


    Thanks I forgot that line. However, even with the dbbooltext field added, the image doesn&#39;t display. Could it be that it doesn&#39;t work when displaying the results on another screen (one screen being the grid, the other being the form?)
    Or could

    MyDb.dbFormDisplayFlds = &#34;-1&#34;

    interfere with the dbbootext?


    ------------
    Mark H. at 12/14/99 5:08:39 PM

    Mark,

    You are missing a dbBoolText statement, something like this:

    MyDb.dbBoolText=&#34;<IMG SRC=images/checkbox.gif>,(blank)&#34;

    Mark H.

    ------------
    MarkT at 12/14/99 4:29:20 PM

    As a quick follow-up...

    Do I need to have the filterfld set in order for this to work properly? I really am a bit confused on that area of aspdb. Also, the particular site this is for would have 6-8 of these boolean fields. Is that too uch to ask?



    ------------
    mark T at 12/14/99 4:06:38 PM

    OK, I&#39;m hacking code provided in samples to attempt to get it to do what I want it to do. Here&#39;s what I am attempting to do:

    Display a grid of items which, when an items is clicked, a new screen displays the details about that item in a custom manner:

    I&#39;ve got MOST of this working, BUT, I cannot get the boolean text to work right. What I&#39;d like to do is have an image appear, in place of True, and leave the field blank if it is false.

    Here is my *hacked* code so far...

    ----------------------------------------------

    <!--ASP-db-->
    <HTML>
    <HEAD><title>ASP-db MH-Bool Form</title>
    </HEAD>


    <BODY BGCOLOR=&#34;A0E0A0&#34; TEXT=Black LINK=BLUE ALINK=RED VLINK=BLUE>
    <FONT FACE=&#34;Arial,Helvetica&#34; Color=Black Size=3>

    <CENTER><B>Welcome to the ASP-db™ Bool Custom Form Demo Page.</B><P>

    This example shows how you can show a bool on a Custom Form.
    <HR WIDTH=66%>

    <%
    Set MyDb = Server.CreateObject(&#34;AspDB.Pro&#34
    MyDb.dbUnit = 14
    Mydb.dbMDB=Server.MapPath(&#34;plants.mdb&#34

    MyDb.dbSQL = &#34;Select * FROM Inventory&#34;
    MyDb.dbMode = &#34;Both&#34;
    MyDb.DbGridInc = &#34;10&#34;
    MyDb.dBColor = &#34;7&#34;
    MyDb.dbGridTableTag = &#34;border=2 cellspacing=2 cellpadding=3&#34;

    Mydb.dbGridDisplayFlds = &#34;Common_Name,Latin,summary&#34;

    MyDb.dbFormDisplayFlds = &#34;-1&#34;
    Mydb.dbExportFlds = &#34;Category,Common_Name,Latin,altname,summary,De tail,New&#34;

    &#39; Note: dbFilterFlds must use the RENAMED field name (not the ORIGINAL field name)!
    &#39; MyDb.dbFilterFlds =&#34;Name, Human?&#34;

    &#39; Mydb.dbFilterDropFlds=&#34;Name,,Table1,Name;&#34;

    &#39; Mydb.dbFilterParams = &#34;DropButtonText=none&#34;

    MyDb.dbImageDir=&#34;/aspdb/images/&#34;
    Mydb.dbNavigation=&#34;bottom&#34;
    Mydb.dbNavigationItem=&#34;top, bottom, next, prev, filter, download&#34;
    Mydb.dbNavigationIcon=&#34;std&#34;

    MyDb.aspDBPro

    &#39; Show the CUSTOM FORM now ?
    if UCASE(Mydb.dbLastScreen) = &#34;FORM&#34; then
    response.write(&#34;<CENTER><TABLE BORDER=1 WIDTH=500><TR><TD><font face=Arial><font size=+1><B>&#34
    response.write(&#34;&#34
    response.write(&#34;&#34; & Session(&#34;ASPdb_14_Common_Name&#34 & &#34;</b></font><hR>&#34
    response.write(&#34;<table width=480><tr><TD><i> &#34; & Session(&#34;ASPdb_14_Latin&#34 & &#34;</i></td><td> </td><TD>&#34
    response.write(&#34;&#34; & Session(&#34;ASPdb_14_summary&#34 & &#34;</td></tr></table>&#34
    response.write(&#34;<img align=right src=images/&#34; & Session(&#34;ASPdb_14_image&#34 & &#34;>&#34
    response.write(&#34;&#34; & Session(&#34;ASPdb_14_Detail&#34 & &#34;<BR>&#34
    if UCASE(Session(&#34;ASPdb_14_New&#34) = &#34;True&#34; then
    response.write(&#34;<b>New:</b><center><img src=images/checkbox.gif></center>&#34
    else
    response.write(&#34;<b>New:</b> NO&#34
    end if

    response.write(&#34;</TD></TR></TABLE></CENTER>&#34
    end if

    %>
    </td></TR></TABLE>
    </BODY>
    </HTML>
    ---------------------------------------

    Once I set this up, I have to access specific categories of items using a hyperlink to bring me to the main list. Also, I need to limit the main list to a specific category at any one time.

    Then, I should have just about everything I need.

    Thanks for helping this ASPDB and VBscript/ASP newbie!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •