Push values from bound form to undound, edit, then pull back

Ask a Question related to Microsoft Access, Design and Development.

  1. #1

    Default Push values from bound form to undound, edit, then pull back

    Hi,

    I've seen answers to similar questions, but none of them quite work. I have
    a main bound form with various bound controls. I wish to be able to click a
    button which will do the following:

    open another (unbound) form
    populate with some of the values from the main form, so they can be edited
    close the new form
    transfer the edited values back.

    I know about "DoCmd.OpenForm, "MyForm", , , , , acDialog " to pause the
    code until the new form is hidden, but how do I then tell the new form to
    use values from the main form?

    If I try

    Forms.SessionDesc.SessionDescText = Forms.[Session test].SessionDescText
    Forms.SessionDesc.SessionPrimary = Forms.[Session
    test].PrimaryLecturerText
    Forms.SessionDesc.SessionSecondary = Forms.[Session
    test].SecondaryLecturerText

    I get "Object doesn't support this property or method" errors, whether this
    code is in the OnClick event of the button, or the Form_Current event of the
    unbound form.

    I'm sure it's something relatively simple I'm missing...

    Dickie


    Dickie Black Guest

  2. Similar Questions and Discussions

    1. Edit, Update, Cancel Push button question
      I have a Edit, Update, Cancel column in my datagrid form modifying the data in each row. These buttons are of type PushButton rather than...
    2. DG-Edit-Loosing data; bound columns - pushbuttons; dataReader
      Dear Readers, I am using C# (vb examples will work for me too - i am vb progrmr). I created a dg (datagrid) with bound columns (hesistant to...
    3. Which options on a G5 would push ship date back to SEP 29?
      As recently as 2-3 days ago, I read that orders placed for G5's were showing up with estimated ship date on or before August 29, 2003, having been...
    4. Wanted - push/rexec/pull script for remote program builds
      I have various ActiveState Perl scripts that run on Windows, Linux, and Solaris, and soon AIX and possibly others. These must be compiled using the...
    5. Set field values on bound form...
      Hi, I have a bound form with a number of fields. I have controls for the fields I want the user to be able to edit, but want to set the values...
  3. #2

    Default Re: Push values from bound form to undound, edit, then pull back

    Thanks, I knew it would be something that simple!

    Dickie

    "Elwin" <bosk@attbi.com> wrote in message
    news:3e7a01c340a0$1a96a090$a601280a@phx.gbl...
    > you should be using exclamations to separate your object
    > names, not periods.
    > eg) Forms!SessionDesc!SessionDescText
    >
    > Periods preceed a method or property name that has been
    > assigned by Access. Exclamations preceed an object name
    > that has been assigned by the user.
    > eg) Forms!SessionDesc.Requery
    >
    > Good luck.
    >
    > >-----Original Message-----
    > >Hi,
    > >
    > >I've seen answers to similar questions, but none of them
    > quite work. I have
    > >a main bound form with various bound controls. I wish to
    > be able to click a
    > >button which will do the following:
    > >
    > >open another (unbound) form
    > >populate with some of the values from the main form, so
    > they can be edited
    > >close the new form
    > >transfer the edited values back.
    > >
    > >I know about "DoCmd.OpenForm, "MyForm", , , , ,
    > acDialog " to pause the
    > >code until the new form is hidden, but how do I then tell
    > the new form to
    > >use values from the main form?
    > >
    > >If I try
    > >
    > > Forms.SessionDesc.SessionDescText = Forms.[Session
    > test].SessionDescText
    > > Forms.SessionDesc.SessionPrimary = Forms.[Session
    > >test].PrimaryLecturerText
    > > Forms.SessionDesc.SessionSecondary = Forms.[Session
    > >test].SecondaryLecturerText
    > >
    > >I get "Object doesn't support this property or method"
    > errors, whether this
    > >code is in the OnClick event of the button, or the
    > Form_Current event of the
    > >unbound form.
    > >
    > >I'm sure it's something relatively simple I'm missing...
    > >
    > >Dickie
    > >
    > >
    > >.
    > >

    Dickie Black Guest

  4. #3

    Default Re: Push values from bound form to undound, edit, then pull back

    On Wed, 2 Jul 2003 12:08:02 +0100, "Dickie Black"
    <r.black@sheffield.ac.uk> wrote:
    > Forms.SessionDesc.SessionDescText = Forms.[Session test].SessionDescText
    Use ! instead of . - it's confusing because they will both *often*
    work interchangably but they're not quite interchangable. The ! refers
    to an item in a collection (such as the Forms collection, or the
    Controls collection of a form), and that's what you need here.


    John W. Vinson[MVP]
    Come for live chats every Tuesday and Thursday
    [url]http://go.compuserve.com/msdevapps?loc=us&access=public[/url]
    John Vinson 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