Creating a Update Record Form

Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default Creating a Update Record Form

    I am building a student records database for our Councillors at the school.
    The database has several tables tat are linked together by relationships. The
    database is built in Access. I am trying to create a CFM page that will allow
    me to select a student in the databse and update all aspects of this student's
    record if need be. I am not sure how to do this. I can do it for just one
    table in the database if I add another it has a seperate update button. Is
    there anyway to encorporate all the tables into one form? Thanks.

    Hung Kuen Kung Fu Guest

  2. Similar Questions and Discussions

    1. Update record form wizard
      I am having problems with inserting update record forms and Custom From from the wizards into php files i am using Dreamweaver cs3 and Developer...
    2. Update Record using form objects
      I would like to update a record using list and combo boxes. I do I accomplish this?;)
    3. Creating button to Save Record and Close Form
      Use the VB Editor window to add a line as follows: Docmd.Close acform, Me.Name The line should be added immediately after the save command...
    4. Why does Update Record fail when the form uses GET?
      If I use the Update Record Behavior, and make the form pass variables using GET, the Update Record fails, or at least the page goes nowhere. Can...
    5. Update Record and Submit Form don't work together???
      This is a re-statement of a question I posted just a while ago in the Dreamweaver Application Discussion group. I have done some experimenting...
  3. #2

    Default Re: Creating a Update Record Form

    One of the beauty's about CF is that it is very easy to update multiple
    tables as the code is so simple. The trick that you need to ensure that you
    have the keyID fields from both tables.



    --
    Regards

    Paul Whitham
    Macromedia Certified Professional for Dreamweaver MX2004
    Valleybiz Internet Design
    [url]www.valleybiz.net[/url]

    Team Macromedia Volunteer for Ultradev/Dreamweaver MX
    [url]www.macromedia.com/support/forums/team_macromedia[/url]

    "Hung Kuen Kung Fu" <webforumsuser@macromedia.com> wrote in message
    news:d462fr$l8s$1@forums.macromedia.com...
    > I am building a student records database for our Councillors at the
    school.
    > The database has several tables tat are linked together by relationships.
    The
    > database is built in Access. I am trying to create a CFM page that will
    allow
    > me to select a student in the databse and update all aspects of this
    student's
    > record if need be. I am not sure how to do this. I can do it for just
    one
    > table in the database if I add another it has a seperate update button.
    Is
    > there anyway to encorporate all the tables into one form? Thanks.
    >

    Paul Whitham TMM Guest

  4. #3

    Default Re: Creating a Update Record Form

    Hello Paul, You are one helpful guy. I think you one of the only guys that
    takes a stab at the nonsense I post here. Thanks so much. Can you expand a
    bit on using the keyid. Do I have to do this manually or do can I do it in
    Dreamweaver? Sorry if I am being retarded. Darren

    Hung Kuen Kung Fu Guest

  5. #4

    Default Re: Creating a Update Record Form

    Darren

    Only too willing to help. This will invole a bit of hand coding because the
    DW behaviours are very much based around one form, one table.

    In terms of the keyid what you need to do is ensure that the recordset
    contains the ID that identifies the record in both tables. Then create you
    form from the recordset and let DW write the code to update the main table.

    Then go into the code and simply copy the update code and create a second
    instruction set that picks up the fields from the second table and updates
    them.
    --
    Regards

    Paul Whitham
    Macromedia Certified Professional for Dreamweaver MX2004
    Valleybiz Internet Design
    [url]www.valleybiz.net[/url]

    Team Macromedia Volunteer for Ultradev/Dreamweaver MX
    [url]www.macromedia.com/support/forums/team_macromedia[/url]

    "Hung Kuen Kung Fu" <webforumsuser@macromedia.com> wrote in message
    news:d48hdm$hhk$1@forums.macromedia.com...
    > Hello Paul, You are one helpful guy. I think you one of the only guys
    that
    > takes a stab at the nonsense I post here. Thanks so much. Can you
    expand a
    > bit on using the keyid. Do I have to do this manually or do can I do it
    in
    > Dreamweaver? Sorry if I am being retarded. Darren
    >

    Paul Whitham TMM Guest

  6. #5

    Default Re: Creating a Update Record Form

    Do I have to create recordsets for all the other tables as well? Is this the
    code I need to copy?

    <form method="post" name="form2" action="<cfoutput>#CurrentPage#</cfoutput>">
    <table align="center">
    <tr valign="baseline">
    <td nowrap align="right">IDstudent:</td>
    <td><cfoutput>#rsupdatestudent.IDstudent#</cfoutput></td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right">FirstName:</td>
    <td><input type="text" name="FirstName"
    value="<cfoutput>#rsupdatestudent.FirstName#</cfoutput>" size="32"></td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right">MiddleName:</td>
    <td><input type="text" name="MiddleName"
    value="<cfoutput>#rsupdatestudent.MiddleName#</cfoutput>" size="32"></td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right">LastName:</td>
    <td><input type="text" name="LastName"
    value="<cfoutput>#rsupdatestudent.LastName#</cfoutput>" size="32"></td>
    </tr>
    <tr valign="baseline">
    <td nowrap align="right">&nbsp;</td>
    <td><input type="submit" value="Update record"></td>
    </tr>
    </table>
    <input type="hidden" name="IDstudent"
    value="<cfoutput>#rsupdatestudent.IDstudent#</cfoutput>">
    <input type="hidden" name="MM_UpdateRecord" value="form2">
    </form>

    Thanks
    Darren

    Hung Kuen Kung Fu Guest

  7. #6

    Default Re: Creating a Update Record Form

    You don't need recordsets for the others providing that the information you
    need to update in them is contained in the initial recordset on the page.

    --
    Regards

    Paul Whitham
    Macromedia Certified Professional for Dreamweaver MX2004
    Valleybiz Internet Design
    [url]www.valleybiz.net[/url]

    Team Macromedia Volunteer for Ultradev/Dreamweaver MX
    [url]www.macromedia.com/support/forums/team_macromedia[/url]

    "Hung Kuen Kung Fu" <webforumsuser@macromedia.com> wrote in message
    news:d4b5u8$jvp$1@forums.macromedia.com...
    > Do I have to create recordsets for all the other tables as well? Is this
    the
    > code I need to copy?
    >
    > <form method="post" name="form2"
    action="<cfoutput>#CurrentPage#</cfoutput>">
    > <table align="center">
    > <tr valign="baseline">
    > <td nowrap align="right">IDstudent:</td>
    > <td><cfoutput>#rsupdatestudent.IDstudent#</cfoutput></td>
    > </tr>
    > <tr valign="baseline">
    > <td nowrap align="right">FirstName:</td>
    > <td><input type="text" name="FirstName"
    > value="<cfoutput>#rsupdatestudent.FirstName#</cfoutput>" size="32"></td>
    > </tr>
    > <tr valign="baseline">
    > <td nowrap align="right">MiddleName:</td>
    > <td><input type="text" name="MiddleName"
    > value="<cfoutput>#rsupdatestudent.MiddleName#</cfoutput>" size="32"></td>
    > </tr>
    > <tr valign="baseline">
    > <td nowrap align="right">LastName:</td>
    > <td><input type="text" name="LastName"
    > value="<cfoutput>#rsupdatestudent.LastName#</cfoutput>" size="32"></td>
    > </tr>
    > <tr valign="baseline">
    > <td nowrap align="right">&nbsp;</td>
    > <td><input type="submit" value="Update record"></td>
    > </tr>
    > </table>
    > <input type="hidden" name="IDstudent"
    > value="<cfoutput>#rsupdatestudent.IDstudent#</cfoutput>">
    > <input type="hidden" name="MM_UpdateRecord" value="form2">
    > </form>
    >
    > Thanks
    > Darren
    >

    Paul Whitham TMM Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139