Results 1 to 9 of 9

Thread: Conditional Display of Edit fields

  1. #1
    Chris Guest

    Conditional Display of Edit fields

    I'm not sure if this is even possible, but here goes -

    I'm working with two different Access tables. When a user first logs on, they can view/add/edit/etc on the first table. However, while editing/updating, if the response in a certain field "NBIC" is "YES," then when the user clicks the "update" button, I need the second table displayed for editing. Is this possible, and if so could someone give me some direction here? Thanks,

    Chris

  2. #2
    John Guest

    Conditional Display of Edit fields (reply)

    Hi Chris,

    When a user chooses a record to update and clicks the Update button, if you Export a field, that field will be properly "filled out" while that update screen is up. Therefore, you can add another code section below your "update" section that does an IF check on that exported session variable and if it's what you want, brings up ANOTHER copy of ASP-db to display your second table. Should be pretty straightforward. All you should need is dbExportFlds and an IF check. To be completely safe, use a different object name and different dbUnit number on the "second" table below.

    Thanks,
    John


    ------------
    Chris at 11/13/00 10:56:06 AM

    I'm not sure if this is even possible, but here goes -

    I'm working with two different Access tables. When a user first logs on, they can view/add/edit/etc on the first table. However, while editing/updating, if the response in a certain field "NBIC" is "YES," then when the user clicks the "update" button, I need the second table displayed for editing. Is this possible, and if so could someone give me some direction here? Thanks,

    Chris

  3. #3
    Frank Kwong Guest

    Conditional Display of Edit fields (reply)

    Use 2 modules. #1 let user edit and export the NBIC field. Check this value upon exiting module #1. Or even w/o exporting this value, just check for NBIC=YES or not from the URL. If it is YES then execute module #2 for another edit. Prohibit #1 execution by setting an URL variable line Second=true. If second <> true then execute #1.


    FK


    ------------
    Chris at 11/13/00 10:56:06 AM

    I&#39;m not sure if this is even possible, but here goes -

    I&#39;m working with two different Access tables. When a user first logs on, they can view/add/edit/etc on the first table. However, while editing/updating, if the response in a certain field &#34;NBIC&#34; is &#34;YES,&#34; then when the user clicks the &#34;update&#34; button, I need the second table displayed for editing. Is this possible, and if so could someone give me some direction here? Thanks,

    Chris

  4. #4
    Chris Guest

    Conditional Display of Edit fields (reply)

    I&#39;ve gotten the second module displaying ok, and I know how to start in edit mode, but how do I make ASP-db edit the record that I was on in the first table. Right now it just brings me to the &#39;add new record&#39; screen upon calling the second module.


    ------------
    Frank Kwong at 11/13/00 11:56:49 AM

    Use 2 modules. #1 let user edit and export the NBIC field. Check this value upon exiting module #1. Or even w/o exporting this value, just check for NBIC=YES or not from the URL. If it is YES then execute module #2 for another edit. Prohibit #1 execution by setting an URL variable line Second=true. If second <> true then execute #1.


    FK


    ------------
    Chris at 11/13/00 10:56:06 AM

    I&#39;m not sure if this is even possible, but here goes -

    I&#39;m working with two different Access tables. When a user first logs on, they can view/add/edit/etc on the first table. However, while editing/updating, if the response in a certain field &#34;NBIC&#34; is &#34;YES,&#34; then when the user clicks the &#34;update&#34; button, I need the second table displayed for editing. Is this possible, and if so could someone give me some direction here? Thanks,

    Chris

  5. #5
    Frank Kwong Guest

    Conditional Display of Edit fields (reply)

    What is the action after this #2 module edit (Update/Delete). Does it end the edit action of #2 and go back to #1 or it just ends ?

    At this time there is no dbStartUp=&#34;Update or Delete&#34;. But if there is a good reason then I can implement that.

    FK


    ------------
    Chris at 11/17/00 11:32:29 AM

    I&#39;ve gotten the second module displaying ok, and I know how to start in edit mode, but how do I make ASP-db edit the record that I was on in the first table. Right now it just brings me to the &#39;add new record&#39; screen upon calling the second module.


    ------------
    Frank Kwong at 11/13/00 11:56:49 AM

    Use 2 modules. #1 let user edit and export the NBIC field. Check this value upon exiting module #1. Or even w/o exporting this value, just check for NBIC=YES or not from the URL. If it is YES then execute module #2 for another edit. Prohibit #1 execution by setting an URL variable line Second=true. If second <> true then execute #1.


    FK


    ------------
    Chris at 11/13/00 10:56:06 AM

    I&#39;m not sure if this is even possible, but here goes -

    I&#39;m working with two different Access tables. When a user first logs on, they can view/add/edit/etc on the first table. However, while editing/updating, if the response in a certain field &#34;NBIC&#34; is &#34;YES,&#34; then when the user clicks the &#34;update&#34; button, I need the second table displayed for editing. Is this possible, and if so could someone give me some direction here? Thanks,

    Chris

  6. #6
    Frank Kwong Guest

    Conditional Display of Edit fields (reply)

    This case does make some sense. I put in the dbStartUp=&#34;EditUpdate&#34; and it works fine. The condition is that there should be only ONE record in the dbSQL or it&#39;ll only edit the first record. I&#39;ll do some more testing before I release this patch.

    FK


    ------------
    Chris at 11/17/00 11:32:29 AM

    I&#39;ve gotten the second module displaying ok, and I know how to start in edit mode, but how do I make ASP-db edit the record that I was on in the first table. Right now it just brings me to the &#39;add new record&#39; screen upon calling the second module.


    ------------
    Frank Kwong at 11/13/00 11:56:49 AM

    Use 2 modules. #1 let user edit and export the NBIC field. Check this value upon exiting module #1. Or even w/o exporting this value, just check for NBIC=YES or not from the URL. If it is YES then execute module #2 for another edit. Prohibit #1 execution by setting an URL variable line Second=true. If second <> true then execute #1.


    FK


    ------------
    Chris at 11/13/00 10:56:06 AM

    I&#39;m not sure if this is even possible, but here goes -

    I&#39;m working with two different Access tables. When a user first logs on, they can view/add/edit/etc on the first table. However, while editing/updating, if the response in a certain field &#34;NBIC&#34; is &#34;YES,&#34; then when the user clicks the &#34;update&#34; button, I need the second table displayed for editing. Is this possible, and if so could someone give me some direction here? Thanks,

    Chris

  7. #7
    Chris Guest

    Conditional Display of Edit fields (reply)

    Frank -
    Thanks for the quick reply/solution.
    I&#39;m looking forward to trying it out!

    -Chris


    ------------
    Frank Kwong at 11/17/00 1:57:44 PM

    This case does make some sense. I put in the dbStartUp=&#34;EditUpdate&#34; and it works fine. The condition is that there should be only ONE record in the dbSQL or it&#39;ll only edit the first record. I&#39;ll do some more testing before I release this patch.

    FK


    ------------
    Chris at 11/17/00 11:32:29 AM

    I&#39;ve gotten the second module displaying ok, and I know how to start in edit mode, but how do I make ASP-db edit the record that I was on in the first table. Right now it just brings me to the &#39;add new record&#39; screen upon calling the second module.


    ------------
    Frank Kwong at 11/13/00 11:56:49 AM

    Use 2 modules. #1 let user edit and export the NBIC field. Check this value upon exiting module #1. Or even w/o exporting this value, just check for NBIC=YES or not from the URL. If it is YES then execute module #2 for another edit. Prohibit #1 execution by setting an URL variable line Second=true. If second <> true then execute #1.


    FK


    ------------
    Chris at 11/13/00 10:56:06 AM

    I&#39;m not sure if this is even possible, but here goes -

    I&#39;m working with two different Access tables. When a user first logs on, they can view/add/edit/etc on the first table. However, while editing/updating, if the response in a certain field &#34;NBIC&#34; is &#34;YES,&#34; then when the user clicks the &#34;update&#34; button, I need the second table displayed for editing. Is this possible, and if so could someone give me some direction here? Thanks,

    Chris

  8. #8
    Frank Kwong Guest

    Conditional Display of Edit fields (reply)

    OH, That is done already. Call support and see whether they would release the patch. If they haven&#39;t got to that yet, you can try to convinence them you want to test it for them at your own risk...

    Frank


    ------------
    Chris at 11/27/00 10:55:00 AM

    Frank -

    Will this patch be available to me soon?
    I&#39;m presenting this database (using ASP-db) to my fellow engineers this Friday, and this presentation will (hopefully) effect the purchase of an ASP-db Enterprise seat. I don&#39;t know any other way to achieve the desired results (other than doing a dbstartup=&#34;EditUpdate&#34, so please let me know as soon as it is available. If it&#39;s still &#39;beta&#39; thats ok with me. Thanks,
    Chris


    ------------
    Frank Kwong at 11/17/00 1:57:44 PM

    This case does make some sense. I put in the dbStartUp=&#34;EditUpdate&#34; and it works fine. The condition is that there should be only ONE record in the dbSQL or it&#39;ll only edit the first record. I&#39;ll do some more testing before I release this patch.

    FK


    ------------
    Chris at 11/17/00 11:32:29 AM

    I&#39;ve gotten the second module displaying ok, and I know how to start in edit mode, but how do I make ASP-db edit the record that I was on in the first table. Right now it just brings me to the &#39;add new record&#39; screen upon calling the second module.


    ------------
    Frank Kwong at 11/13/00 11:56:49 AM

    Use 2 modules. #1 let user edit and export the NBIC field. Check this value upon exiting module #1. Or even w/o exporting this value, just check for NBIC=YES or not from the URL. If it is YES then execute module #2 for another edit. Prohibit #1 execution by setting an URL variable line Second=true. If second <> true then execute #1.


    FK


    ------------
    Chris at 11/13/00 10:56:06 AM

    I&#39;m not sure if this is even possible, but here goes -

    I&#39;m working with two different Access tables. When a user first logs on, they can view/add/edit/etc on the first table. However, while editing/updating, if the response in a certain field &#34;NBIC&#34; is &#34;YES,&#34; then when the user clicks the &#34;update&#34; button, I need the second table displayed for editing. Is this possible, and if so could someone give me some direction here? Thanks,

    Chris

  9. #9
    Chris Guest

    Problem with EditUpdate

    Frank -

    I think my code is correct, however, sometimes when this page is opened it gives me an error &#34;Warning: User supplied query returns no records for display.&#34; It works the first time, then any time after that it displays the error

    This page starts in EditUpdate Mode, and it selects a record based on a passed session variable. One interesting fact is that if I comment out the &#39;dbstartup=editupdate&#39; line then I don&#39;t get that error. But I&#39;m not sure if this is a code error or an error with the new feature - my code is below. Like I said, it works the first time around. Thanks,
    Chris

    <% response.buffer=true
    idcheck = session(&#34;aspdb_964321_ID&#34 %>

    <!DOCTYPE HTML PUBLIC &#34;-//W3C//DTD HTML 4.0 Transitional//EN&#34;>
    <html>
    <head><title>Untitled</title></head>
    <body background=&#34;d:chrishiringhiring_bkgnd_small.jp g&#34; alt=&#34;&#34;>
    <center>
    <Font FACE=&#34;Arial,Helvetica&#34; COLOR=&#34;003300&#34; size=3>
    <table border=&#34;2&#34; cellpadding=&#34;3&#34;>
    <tr>
    <td>
    <CENTER>
    <FONT COLOR=GREEN SIZE=4>
    <B>ADDITIONAL INFO REQD FOR <I>NON-NBIC LISTED</I> COMPONENTS</B><BR>
    </FONT>
    </CENTER>
    </td></tr>
    <tr><td>
    <%

    Set MyDb4 = Server.CreateObject(&#34;Asp.DB&#34
    Mydb4.dbMDB = &#34;d:chrispressure systemspvs.mdb&#34;
    Mydb4.dbUnit = 964329

    idtest = &#34;id= &#34;
    idtest = idtest & idcheck
    response.write(idtest) &#39;this always gives me the proper ID,
    &#39;so I know the session var is being passed

    Mydb4.dbSQL = &#34;SELECT * FROM Encalc WHERE ID = &#34; & idcheck & &#34; &#34;
    MyDb4.dbStartup = &#34;EditUpdate&#34;
    MyDb4.dbButtonAnchor=false
    MyDb4.dbColor = &#34;Lightyellow,DarkBlue,LightBlue,Black,Lightyel low&#34;
    MyDb4.Dboptions = &#34;HeaderFontTag = face=Arial size=2, cellfonttag=face=arial size=2&#34;

    EF2 = EF2 & &#34;42[-> NO ENTRY <-], 43[-> NO ENTRY <-],&#34;
    EF2 = EF2 & &#34;44[-> NO ENTRY <-], 45[-> NO ENTRY <-], 46[-> NO ENTRY <-], 47[-> NO ENTRY <-],&#34;
    EF2 = EF2 & &#34;48[-> NO ENTRY <-], 49[-> NO ENTRY <-], 50[-> NO ENTRY <-], 51[-> NO ENTRY <-],&#34;
    EF2 = EF2 & &#34;52[-> NO ENTRY <-], 53[-> NO ENTRY <-], 54[-> NO ENTRY <-], 55[-> NO ENTRY <-],&#34;
    EF2 = EF2 & &#34;56[-> NO ENTRY <-], 57[-> NO ENTRY <-], 58[-> NO ENTRY <-], 59[-> NO ENTRY <-],&#34;

    Mydb4.dbEditFlds = EF2

    EDF2 = EDF2 & &#34;Orientation,,,HORIZONTAL/VERTICAL/SPHERE/NO DATA AVAIL./-> NO ENTRY <-;&#34;
    EDF2 = EDF2 & &#34;Head type,,,SPHERICAL/TOROSPHERICAL/ELLIPTICAL/FLAT/NO DATA AVAIL./-> NO ENTRY <-;&#34;
    EDF2 = EDF2 & &#34;Long Seams,,,WELDED/SINGLE/DOUBLE/LAP/BUTT/NO DATA AVAIL./-> NO ENTRY <-;&#34;
    EDF2 = EDF2 & &#34;Girth Seams,,,WELDED/SINGLE/DOUBLE/LAP/BUTT/NO DATA AVAIL./-> NO ENTRY <-;&#34;
    EDF2 = EDF2 & &#34;Pneumatic/Hydrostatic Des,,,PNEUMATIC/HYDROSTATIC/NO INITIAL TEST/NO DATA AVAIL./-> NO ENTRY <-;&#34;
    EDF2 = EDF2 & &#34;skirt,,,YES/NO/NO DATA AVAIL./-> NO ENTRY <-;&#34;
    EDF2 = EDF2 & &#34;lugs,,,YES/NO/NO DATA AVAIL./-> NO ENTRY <-;&#34;
    EDF2 = EDF2 & &#34;legs,,,YES/NO/NO DATA AVAIL./-> NO ENTRY <-;&#34;
    EDF2 = EDF2 & &#34;saddle,,,YES/NO/NO DATA AVAIL./-> NO ENTRY <-;&#34;
    EDF2 = EDF2 & &#34;No of Manholes,,,0/1/2/3/4/5/6/7/8/NO DATA AVAIL./-> NO ENTRY <-;&#34;
    EDF2 = EDF2 & &#34;No of Handholds,,,0/1/2/3/4/5/6/7/8/NO DATA AVAIL./-> NO ENTRY <-;&#34;
    EDF2 = EDF2 & &#34;No of Threaded,,,0/1/2/3/4/5/6/7/8/NO DATA AVAIL./-> NO ENTRY <-;&#34;
    EDF2 = EDF2 & &#34;Thermal Calcs,,,ALL/PARTIAL/NONE/NO DATA AVAIL./-> NO ENTRY <-;&#34;
    EDF2 = EDF2 & &#34;Mechanical Calcs,,,ALL/PARTIAL/NONE/NO DATA AVAIL./-> NO ENTRY <-;&#34;

    Mydb4.DbEditDropFlds = EDF2
    MyDb4.dbEditUpdateROFlds = &#34;Component&#34;
    Mydb4.dbEditParams= &#34;TableName=Encalc,BookMarkFlds=0,TableTag=Bord er=2,RecordScope=single, EditCol = 3, Size200=1x15&#34;

    MyDb4.dbImageDir=&#34;../images/&#34;

    Mydb4.dbNavigationItem=&#34;add,update&#34;
    MyDb4.aspDB

    If ucase(request(&#34;aspdbeditbut_964329&#34) = &#34;UPDATE CURRENT RECORD&#34; then
    Mydb4.dbreset(964329)
    backtopage = &#34;pv.asp?aspDBBut_964321=aspDBgoForm::&#34;
    backtopage = backtopage & session(&#34;RP&#34
    backtopage = backtopage & &#34;&aspDBUnit=_964321&aspDBClick_964321=index::& #34;
    backtopage = backtopage & session(&#34;RP&#34
    response.redirect(backtopage)
    end if

    %>

Posting Permissions

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