Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Form - data input

Discussion in 'Information Technology' started by Sarah at DaVita, Jul 28, 2006.

Tags:
  1. Sarah at DaVita

    Sarah at DaVita
    Expand Collapse
    Guest

    In a form I have a lookup in the header that goes to table a. In the detail
    I then say another field is equal to the the field just looked up in table a.
    I want this to be entered into table b. The form returns the data I want
    but will not enter the result into table b. Has anyone experienced this
    before? If so, how did you overcome it?
    Thanks
    Sarah
     
  2. Loading...


  3. Douglas J. Steele

    Douglas J. Steele
    Expand Collapse
    Guest

    Why do you want to duplicate data between the two tables?

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no private e-mails, please)


    "Sarah at DaVita" <Sarah at DaVita@discussions.microsoft.com> wrote in
    message news:7972EC23-28D8-4750-9BB2-932E93D14AF0@microsoft.com...
    > In a form I have a lookup in the header that goes to table a. In the
    > detail
    > I then say another field is equal to the the field just looked up in table
    > a.
    > I want this to be entered into table b. The form returns the data I want
    > but will not enter the result into table b. Has anyone experienced this
    > before? If so, how did you overcome it?
    > Thanks
    > Sarah
     
  4. Sarah at DaVita

    Sarah at DaVita
    Expand Collapse
    Guest

    Not duplicate data - I am looking up something in table a by its description-
    grabing the unique id and entering the unique id into table b.

    "Douglas J. Steele" wrote:

    > Why do you want to duplicate data between the two tables?
    >
    > --
    > Doug Steele, Microsoft Access MVP
    > http://I.Am/DougSteele
    > (no private e-mails, please)
    >
    >
    > "Sarah at DaVita" <Sarah at DaVita@discussions.microsoft.com> wrote in
    > message news:7972EC23-28D8-4750-9BB2-932E93D14AF0@microsoft.com...
    > > In a form I have a lookup in the header that goes to table a. In the
    > > detail
    > > I then say another field is equal to the the field just looked up in table
    > > a.
    > > I want this to be entered into table b. The form returns the data I want
    > > but will not enter the result into table b. Has anyone experienced this
    > > before? If so, how did you overcome it?
    > > Thanks
    > > Sarah

    >
    >
    >
     
  5. Douglas J. Steele

    Douglas J. Steele
    Expand Collapse
    Guest

    If you already have some means of looking up the value in the other table,
    you don't need to store the looked-up value as well.

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no private e-mails, please)


    "Sarah at DaVita" <s.petterson@davita.com.(donotspam)> wrote in message
    news:3AE9DB41-9CB8-4381-94EA-EDD6C15177C4@microsoft.com...
    > Not duplicate data - I am looking up something in table a by its
    > description-
    > grabing the unique id and entering the unique id into table b.
    >
    > "Douglas J. Steele" wrote:
    >
    >> Why do you want to duplicate data between the two tables?
    >>
    >> --
    >> Doug Steele, Microsoft Access MVP
    >> http://I.Am/DougSteele
    >> (no private e-mails, please)
    >>
    >>
    >> "Sarah at DaVita" <Sarah at DaVita@discussions.microsoft.com> wrote in
    >> message news:7972EC23-28D8-4750-9BB2-932E93D14AF0@microsoft.com...
    >> > In a form I have a lookup in the header that goes to table a. In the
    >> > detail
    >> > I then say another field is equal to the the field just looked up in
    >> > table
    >> > a.
    >> > I want this to be entered into table b. The form returns the data I
    >> > want
    >> > but will not enter the result into table b. Has anyone experienced
    >> > this
    >> > before? If so, how did you overcome it?
    >> > Thanks
    >> > Sarah

    >>
    >>
    >>
     
  6. Sarah at DaVita

    Sarah at DaVita
    Expand Collapse
    Guest

    The lookup I do now requires human intervention. If I do not get the UID
    stored as a forgein key in table b then everytime it is needed it will
    require human intervention. I am taking two unrelated pieces of information
    and relating them for future use.

    "Douglas J. Steele" wrote:

    > If you already have some means of looking up the value in the other table,
    > you don't need to store the looked-up value as well.
    >
    > --
    > Doug Steele, Microsoft Access MVP
    > http://I.Am/DougSteele
    > (no private e-mails, please)
    >
    >
    > "Sarah at DaVita" <s.petterson@davita.com.(donotspam)> wrote in message
    > news:3AE9DB41-9CB8-4381-94EA-EDD6C15177C4@microsoft.com...
    > > Not duplicate data - I am looking up something in table a by its
    > > description-
    > > grabing the unique id and entering the unique id into table b.
    > >
    > > "Douglas J. Steele" wrote:
    > >
    > >> Why do you want to duplicate data between the two tables?
    > >>
    > >> --
    > >> Doug Steele, Microsoft Access MVP
    > >> http://I.Am/DougSteele
    > >> (no private e-mails, please)
    > >>
    > >>
    > >> "Sarah at DaVita" <Sarah at DaVita@discussions.microsoft.com> wrote in
    > >> message news:7972EC23-28D8-4750-9BB2-932E93D14AF0@microsoft.com...
    > >> > In a form I have a lookup in the header that goes to table a. In the
    > >> > detail
    > >> > I then say another field is equal to the the field just looked up in
    > >> > table
    > >> > a.
    > >> > I want this to be entered into table b. The form returns the data I
    > >> > want
    > >> > but will not enter the result into table b. Has anyone experienced
    > >> > this
    > >> > before? If so, how did you overcome it?
    > >> > Thanks
    > >> > Sarah
    > >>
    > >>
    > >>

    >
    >
    >
     
  7. Douglas J. Steele

    Douglas J. Steele
    Expand Collapse
    Guest

    How are you prompting for the input now?

    You may have to put code in your form to transfer that value to the table.

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no private e-mails, please)


    "Sarah at DaVita" <s.petterson@davita.com.(donotspam)> wrote in message
    news:B53ABD57-CC40-4FE1-8AD2-FE4F1435D0B3@microsoft.com...
    > The lookup I do now requires human intervention. If I do not get the UID
    > stored as a forgein key in table b then everytime it is needed it will
    > require human intervention. I am taking two unrelated pieces of
    > information
    > and relating them for future use.
    >
    > "Douglas J. Steele" wrote:
    >
    >> If you already have some means of looking up the value in the other
    >> table,
    >> you don't need to store the looked-up value as well.
    >>
    >> --
    >> Doug Steele, Microsoft Access MVP
    >> http://I.Am/DougSteele
    >> (no private e-mails, please)
    >>
    >>
    >> "Sarah at DaVita" <s.petterson@davita.com.(donotspam)> wrote in message
    >> news:3AE9DB41-9CB8-4381-94EA-EDD6C15177C4@microsoft.com...
    >> > Not duplicate data - I am looking up something in table a by its
    >> > description-
    >> > grabing the unique id and entering the unique id into table b.
    >> >
    >> > "Douglas J. Steele" wrote:
    >> >
    >> >> Why do you want to duplicate data between the two tables?
    >> >>
    >> >> --
    >> >> Doug Steele, Microsoft Access MVP
    >> >> http://I.Am/DougSteele
    >> >> (no private e-mails, please)
    >> >>
    >> >>
    >> >> "Sarah at DaVita" <Sarah at DaVita@discussions.microsoft.com> wrote in
    >> >> message news:7972EC23-28D8-4750-9BB2-932E93D14AF0@microsoft.com...
    >> >> > In a form I have a lookup in the header that goes to table a. In
    >> >> > the
    >> >> > detail
    >> >> > I then say another field is equal to the the field just looked up in
    >> >> > table
    >> >> > a.
    >> >> > I want this to be entered into table b. The form returns the data I
    >> >> > want
    >> >> > but will not enter the result into table b. Has anyone experienced
    >> >> > this
    >> >> > before? If so, how did you overcome it?
    >> >> > Thanks
    >> >> > Sarah
    >> >>
    >> >>
    >> >>

    >>
    >>
    >>
     
  8. Sarah at DaVita

    Sarah at DaVita
    Expand Collapse
    Guest

    The user goes to the form and find the item they need in a drop down list.
    So if they select 'Yada' and its UID is 17 I have put =combobox11 the field
    that corrasponds to the UID in the table I want updated. When I look into
    the table after I save the record that column is null - UID 17 just shows in
    the form but doesn't get to the table. Confusing because I thought if you
    see it in the form and save it will write to the table. I am fairly new at
    this so please excuse the rambling.

    "Douglas J. Steele" wrote:

    > How are you prompting for the input now?
    >
    > You may have to put code in your form to transfer that value to the table.
    >
    > --
    > Doug Steele, Microsoft Access MVP
    > http://I.Am/DougSteele
    > (no private e-mails, please)
    >
    >
    > "Sarah at DaVita" <s.petterson@davita.com.(donotspam)> wrote in message
    > news:B53ABD57-CC40-4FE1-8AD2-FE4F1435D0B3@microsoft.com...
    > > The lookup I do now requires human intervention. If I do not get the UID
    > > stored as a forgein key in table b then everytime it is needed it will
    > > require human intervention. I am taking two unrelated pieces of
    > > information
    > > and relating them for future use.
    > >
    > > "Douglas J. Steele" wrote:
    > >
    > >> If you already have some means of looking up the value in the other
    > >> table,
    > >> you don't need to store the looked-up value as well.
    > >>
    > >> --
    > >> Doug Steele, Microsoft Access MVP
    > >> http://I.Am/DougSteele
    > >> (no private e-mails, please)
    > >>
    > >>
    > >> "Sarah at DaVita" <s.petterson@davita.com.(donotspam)> wrote in message
    > >> news:3AE9DB41-9CB8-4381-94EA-EDD6C15177C4@microsoft.com...
    > >> > Not duplicate data - I am looking up something in table a by its
    > >> > description-
    > >> > grabing the unique id and entering the unique id into table b.
    > >> >
    > >> > "Douglas J. Steele" wrote:
    > >> >
    > >> >> Why do you want to duplicate data between the two tables?
    > >> >>
    > >> >> --
    > >> >> Doug Steele, Microsoft Access MVP
    > >> >> http://I.Am/DougSteele
    > >> >> (no private e-mails, please)
    > >> >>
    > >> >>
    > >> >> "Sarah at DaVita" <Sarah at DaVita@discussions.microsoft.com> wrote in
    > >> >> message news:7972EC23-28D8-4750-9BB2-932E93D14AF0@microsoft.com...
    > >> >> > In a form I have a lookup in the header that goes to table a. In
    > >> >> > the
    > >> >> > detail
    > >> >> > I then say another field is equal to the the field just looked up in
    > >> >> > table
    > >> >> > a.
    > >> >> > I want this to be entered into table b. The form returns the data I
    > >> >> > want
    > >> >> > but will not enter the result into table b. Has anyone experienced
    > >> >> > this
    > >> >> > before? If so, how did you overcome it?
    > >> >> > Thanks
    > >> >> > Sarah
    > >> >>
    > >> >>
    > >> >>
    > >>
    > >>
    > >>

    >
    >
    >
     
  9. Douglas J. Steele

    Douglas J. Steele
    Expand Collapse
    Guest

    If you've got "=combobox11" as the control source of the text box, that's
    why it's not going into your table.

    Set the control source to the name of the field in the underlying recordset.
    In the AfterUpdate event of the combobox, put something like:

    Private Sub Combobox11_AfterUpdate()

    Me.MyTextBox = Me.combobox11

    End Sub

    (replace MyTextBox with the appropriate name)

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no private e-mails, please)


    "Sarah at DaVita" <s.petterson@davita.com.(donotspam)> wrote in message
    news:E660AFB8-4A6C-4816-9DDF-CC3CBE38FE71@microsoft.com...
    > The user goes to the form and find the item they need in a drop down list.
    > So if they select 'Yada' and its UID is 17 I have put =combobox11 the
    > field
    > that corrasponds to the UID in the table I want updated. When I look into
    > the table after I save the record that column is null - UID 17 just shows
    > in
    > the form but doesn't get to the table. Confusing because I thought if you
    > see it in the form and save it will write to the table. I am fairly new
    > at
    > this so please excuse the rambling.
    >
    > "Douglas J. Steele" wrote:
    >
    >> How are you prompting for the input now?
    >>
    >> You may have to put code in your form to transfer that value to the
    >> table.
    >>
    >> --
    >> Doug Steele, Microsoft Access MVP
    >> http://I.Am/DougSteele
    >> (no private e-mails, please)
    >>
    >>
    >> "Sarah at DaVita" <s.petterson@davita.com.(donotspam)> wrote in message
    >> news:B53ABD57-CC40-4FE1-8AD2-FE4F1435D0B3@microsoft.com...
    >> > The lookup I do now requires human intervention. If I do not get the
    >> > UID
    >> > stored as a forgein key in table b then everytime it is needed it will
    >> > require human intervention. I am taking two unrelated pieces of
    >> > information
    >> > and relating them for future use.
    >> >
    >> > "Douglas J. Steele" wrote:
    >> >
    >> >> If you already have some means of looking up the value in the other
    >> >> table,
    >> >> you don't need to store the looked-up value as well.
    >> >>
    >> >> --
    >> >> Doug Steele, Microsoft Access MVP
    >> >> http://I.Am/DougSteele
    >> >> (no private e-mails, please)
    >> >>
    >> >>
    >> >> "Sarah at DaVita" <s.petterson@davita.com.(donotspam)> wrote in
    >> >> message
    >> >> news:3AE9DB41-9CB8-4381-94EA-EDD6C15177C4@microsoft.com...
    >> >> > Not duplicate data - I am looking up something in table a by its
    >> >> > description-
    >> >> > grabing the unique id and entering the unique id into table b.
    >> >> >
    >> >> > "Douglas J. Steele" wrote:
    >> >> >
    >> >> >> Why do you want to duplicate data between the two tables?
    >> >> >>
    >> >> >> --
    >> >> >> Doug Steele, Microsoft Access MVP
    >> >> >> http://I.Am/DougSteele
    >> >> >> (no private e-mails, please)
    >> >> >>
    >> >> >>
    >> >> >> "Sarah at DaVita" <Sarah at DaVita@discussions.microsoft.com> wrote
    >> >> >> in
    >> >> >> message news:7972EC23-28D8-4750-9BB2-932E93D14AF0@microsoft.com...
    >> >> >> > In a form I have a lookup in the header that goes to table a. In
    >> >> >> > the
    >> >> >> > detail
    >> >> >> > I then say another field is equal to the the field just looked up
    >> >> >> > in
    >> >> >> > table
    >> >> >> > a.
    >> >> >> > I want this to be entered into table b. The form returns the
    >> >> >> > data I
    >> >> >> > want
    >> >> >> > but will not enter the result into table b. Has anyone
    >> >> >> > experienced
    >> >> >> > this
    >> >> >> > before? If so, how did you overcome it?
    >> >> >> > Thanks
    >> >> >> > Sarah
    >> >> >>
    >> >> >>
    >> >> >>
    >> >>
    >> >>
    >> >>

    >>
    >>
    >>
     
  10. Sarah at DaVita

    Sarah at DaVita
    Expand Collapse
    Guest

    The name of the field I am updating is ownership.ptrn_id. The data I want in
    that field is coming from partner addresses.ptrn_id. The name of the combo
    box that I look up the data in is partner - it looks into the partner
    addresses table for the ptrn_id. In the form I put in the combo box
    representing the ownership.ptrn_id the following:
    Private Sub Partner_AfterUpdate()
    [Ownership]![ptnr_ID] = Partner
    End Sub
    It errors out. ??????
    Thanks in advance for your help on this.



    "Douglas J. Steele" wrote:

    > If you've got "=combobox11" as the control source of the text box, that's
    > why it's not going into your table.
    >
    > Set the control source to the name of the field in the underlying recordset.
    > In the AfterUpdate event of the combobox, put something like:
    >
    > Private Sub Combobox11_AfterUpdate()
    >
    > Me.MyTextBox = Me.combobox11
    >
    > End Sub
    >
    > (replace MyTextBox with the appropriate name)
    >
    > --
    > Doug Steele, Microsoft Access MVP
    > http://I.Am/DougSteele
    > (no private e-mails, please)
    >
    >
    > "Sarah at DaVita" <s.petterson@davita.com.(donotspam)> wrote in message
    > news:E660AFB8-4A6C-4816-9DDF-CC3CBE38FE71@microsoft.com...
    > > The user goes to the form and find the item they need in a drop down list.
    > > So if they select 'Yada' and its UID is 17 I have put =combobox11 the
    > > field
    > > that corrasponds to the UID in the table I want updated. When I look into
    > > the table after I save the record that column is null - UID 17 just shows
    > > in
    > > the form but doesn't get to the table. Confusing because I thought if you
    > > see it in the form and save it will write to the table. I am fairly new
    > > at
    > > this so please excuse the rambling.
    > >
    > > "Douglas J. Steele" wrote:
    > >
    > >> How are you prompting for the input now?
    > >>
    > >> You may have to put code in your form to transfer that value to the
    > >> table.
    > >>
    > >> --
    > >> Doug Steele, Microsoft Access MVP
    > >> http://I.Am/DougSteele
    > >> (no private e-mails, please)
    > >>
    > >>
    > >> "Sarah at DaVita" <s.petterson@davita.com.(donotspam)> wrote in message
    > >> news:B53ABD57-CC40-4FE1-8AD2-FE4F1435D0B3@microsoft.com...
    > >> > The lookup I do now requires human intervention. If I do not get the
    > >> > UID
    > >> > stored as a forgein key in table b then everytime it is needed it will
    > >> > require human intervention. I am taking two unrelated pieces of
    > >> > information
    > >> > and relating them for future use.
    > >> >
    > >> > "Douglas J. Steele" wrote:
    > >> >
    > >> >> If you already have some means of looking up the value in the other
    > >> >> table,
    > >> >> you don't need to store the looked-up value as well.
    > >> >>
    > >> >> --
    > >> >> Doug Steele, Microsoft Access MVP
    > >> >> http://I.Am/DougSteele
    > >> >> (no private e-mails, please)
    > >> >>
    > >> >>
    > >> >> "Sarah at DaVita" <s.petterson@davita.com.(donotspam)> wrote in
    > >> >> message
    > >> >> news:3AE9DB41-9CB8-4381-94EA-EDD6C15177C4@microsoft.com...
    > >> >> > Not duplicate data - I am looking up something in table a by its
    > >> >> > description-
    > >> >> > grabing the unique id and entering the unique id into table b.
    > >> >> >
    > >> >> > "Douglas J. Steele" wrote:
    > >> >> >
    > >> >> >> Why do you want to duplicate data between the two tables?
    > >> >> >>
    > >> >> >> --
    > >> >> >> Doug Steele, Microsoft Access MVP
    > >> >> >> http://I.Am/DougSteele
    > >> >> >> (no private e-mails, please)
    > >> >> >>
    > >> >> >>
    > >> >> >> "Sarah at DaVita" <Sarah at DaVita@discussions.microsoft.com> wrote
    > >> >> >> in
    > >> >> >> message news:7972EC23-28D8-4750-9BB2-932E93D14AF0@microsoft.com...
    > >> >> >> > In a form I have a lookup in the header that goes to table a. In
    > >> >> >> > the
    > >> >> >> > detail
    > >> >> >> > I then say another field is equal to the the field just looked up
    > >> >> >> > in
    > >> >> >> > table
    > >> >> >> > a.
    > >> >> >> > I want this to be entered into table b. The form returns the
    > >> >> >> > data I
    > >> >> >> > want
    > >> >> >> > but will not enter the result into table b. Has anyone
    > >> >> >> > experienced
    > >> >> >> > this
    > >> >> >> > before? If so, how did you overcome it?
    > >> >> >> > Thanks
    > >> >> >> > Sarah
    > >> >> >>
    > >> >> >>
    > >> >> >>
    > >> >>
    > >> >>
    > >> >>
    > >>
    > >>
    > >>

    >
    >
    >
     
  11. Douglas J Steele

    Douglas J Steele
    Expand Collapse
    Guest

    What is ownership: a table or a form? If it's a form, is it the form on
    which the combo box exists as well?

    If it's a table, is it the table that constitutes the recordsource for the
    form on which the combo box exists?

    You left out the Me's in your code: you need those to ensure that Access
    realizes that you're talking about objects associated with your form, and
    not variables.

    Try:

    Private Sub Partner_AfterUpdate()
    Me![ptnr_ID] = Me!Partner
    End Sub

    If that doesn't work, post back, answering the questions above.

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no e-mails, please!)


    "Sarah at DaVita" <s.petterson@davita.com.(donotspam)> wrote in message
    news:0D05FDE7-B66E-451E-A242-F17D539FB65C@microsoft.com...
    > The name of the field I am updating is ownership.ptrn_id. The data I want

    in
    > that field is coming from partner addresses.ptrn_id. The name of the

    combo
    > box that I look up the data in is partner - it looks into the partner
    > addresses table for the ptrn_id. In the form I put in the combo box
    > representing the ownership.ptrn_id the following:
    > Private Sub Partner_AfterUpdate()
    > [Ownership]![ptnr_ID] = Partner
    > End Sub
    > It errors out. ??????
    > Thanks in advance for your help on this.
    >
    >
    >
    > "Douglas J. Steele" wrote:
    >
    > > If you've got "=combobox11" as the control source of the text box,

    that's
    > > why it's not going into your table.
    > >
    > > Set the control source to the name of the field in the underlying

    recordset.
    > > In the AfterUpdate event of the combobox, put something like:
    > >
    > > Private Sub Combobox11_AfterUpdate()
    > >
    > > Me.MyTextBox = Me.combobox11
    > >
    > > End Sub
    > >
    > > (replace MyTextBox with the appropriate name)
    > >
    > > --
    > > Doug Steele, Microsoft Access MVP
    > > http://I.Am/DougSteele
    > > (no private e-mails, please)
    > >
    > >
    > > "Sarah at DaVita" <s.petterson@davita.com.(donotspam)> wrote in message
    > > news:E660AFB8-4A6C-4816-9DDF-CC3CBE38FE71@microsoft.com...
    > > > The user goes to the form and find the item they need in a drop down

    list.
    > > > So if they select 'Yada' and its UID is 17 I have put =combobox11 the
    > > > field
    > > > that corrasponds to the UID in the table I want updated. When I look

    into
    > > > the table after I save the record that column is null - UID 17 just

    shows
    > > > in
    > > > the form but doesn't get to the table. Confusing because I thought if

    you
    > > > see it in the form and save it will write to the table. I am fairly

    new
    > > > at
    > > > this so please excuse the rambling.
    > > >
    > > > "Douglas J. Steele" wrote:
    > > >
    > > >> How are you prompting for the input now?
    > > >>
    > > >> You may have to put code in your form to transfer that value to the
    > > >> table.
    > > >>
    > > >> --
    > > >> Doug Steele, Microsoft Access MVP
    > > >> http://I.Am/DougSteele
    > > >> (no private e-mails, please)
    > > >>
    > > >>
    > > >> "Sarah at DaVita" <s.petterson@davita.com.(donotspam)> wrote in

    message
    > > >> news:B53ABD57-CC40-4FE1-8AD2-FE4F1435D0B3@microsoft.com...
    > > >> > The lookup I do now requires human intervention. If I do not get

    the
    > > >> > UID
    > > >> > stored as a forgein key in table b then everytime it is needed it

    will
    > > >> > require human intervention. I am taking two unrelated pieces of
    > > >> > information
    > > >> > and relating them for future use.
    > > >> >
    > > >> > "Douglas J. Steele" wrote:
    > > >> >
    > > >> >> If you already have some means of looking up the value in the

    other
    > > >> >> table,
    > > >> >> you don't need to store the looked-up value as well.
    > > >> >>
    > > >> >> --
    > > >> >> Doug Steele, Microsoft Access MVP
    > > >> >> http://I.Am/DougSteele
    > > >> >> (no private e-mails, please)
    > > >> >>
    > > >> >>
    > > >> >> "Sarah at DaVita" <s.petterson@davita.com.(donotspam)> wrote in
    > > >> >> message
    > > >> >> news:3AE9DB41-9CB8-4381-94EA-EDD6C15177C4@microsoft.com...
    > > >> >> > Not duplicate data - I am looking up something in table a by its
    > > >> >> > description-
    > > >> >> > grabing the unique id and entering the unique id into table b.
    > > >> >> >
    > > >> >> > "Douglas J. Steele" wrote:
    > > >> >> >
    > > >> >> >> Why do you want to duplicate data between the two tables?
    > > >> >> >>
    > > >> >> >> --
    > > >> >> >> Doug Steele, Microsoft Access MVP
    > > >> >> >> http://I.Am/DougSteele
    > > >> >> >> (no private e-mails, please)
    > > >> >> >>
    > > >> >> >>
    > > >> >> >> "Sarah at DaVita" <Sarah at DaVita@discussions.microsoft.com>

    wrote
    > > >> >> >> in
    > > >> >> >> message

    news:7972EC23-28D8-4750-9BB2-932E93D14AF0@microsoft.com...
    > > >> >> >> > In a form I have a lookup in the header that goes to table a.

    In
    > > >> >> >> > the
    > > >> >> >> > detail
    > > >> >> >> > I then say another field is equal to the the field just

    looked up
    > > >> >> >> > in
    > > >> >> >> > table
    > > >> >> >> > a.
    > > >> >> >> > I want this to be entered into table b. The form returns the
    > > >> >> >> > data I
    > > >> >> >> > want
    > > >> >> >> > but will not enter the result into table b. Has anyone
    > > >> >> >> > experienced
    > > >> >> >> > this
    > > >> >> >> > before? If so, how did you overcome it?
    > > >> >> >> > Thanks
    > > >> >> >> > Sarah
    > > >> >> >>
    > > >> >> >>
    > > >> >> >>
    > > >> >>
    > > >> >>
    > > >> >>
    > > >>
    > > >>
    > > >>

    > >
    > >
    > >
     
  12. Sarah at DaVita

    Sarah at DaVita
    Expand Collapse
    Guest

    It now puts the id into the field on the form but still does not put it into
    the table.
    ownership is the table I want to update with the ptnr_id.
    Partner addresses is the table the data is coming from.

    "Douglas J Steele" wrote:

    > What is ownership: a table or a form? If it's a form, is it the form on
    > which the combo box exists as well?
    >
    > If it's a table, is it the table that constitutes the recordsource for the
    > form on which the combo box exists?
    >
    > You left out the Me's in your code: you need those to ensure that Access
    > realizes that you're talking about objects associated with your form, and
    > not variables.
    >
    > Try:
    >
    > Private Sub Partner_AfterUpdate()
    > Me![ptnr_ID] = Me!Partner
    > End Sub
    >
    > If that doesn't work, post back, answering the questions above.
    >
    > --
    > Doug Steele, Microsoft Access MVP
    > http://I.Am/DougSteele
    > (no e-mails, please!)
    >
    >
    > "Sarah at DaVita" <s.petterson@davita.com.(donotspam)> wrote in message
    > news:0D05FDE7-B66E-451E-A242-F17D539FB65C@microsoft.com...
    > > The name of the field I am updating is ownership.ptrn_id. The data I want

    > in
    > > that field is coming from partner addresses.ptrn_id. The name of the

    > combo
    > > box that I look up the data in is partner - it looks into the partner
    > > addresses table for the ptrn_id. In the form I put in the combo box
    > > representing the ownership.ptrn_id the following:
    > > Private Sub Partner_AfterUpdate()
    > > [Ownership]![ptnr_ID] = Partner
    > > End Sub
    > > It errors out. ??????
    > > Thanks in advance for your help on this.
    > >
    > >
    > >
    > > "Douglas J. Steele" wrote:
    > >
    > > > If you've got "=combobox11" as the control source of the text box,

    > that's
    > > > why it's not going into your table.
    > > >
    > > > Set the control source to the name of the field in the underlying

    > recordset.
    > > > In the AfterUpdate event of the combobox, put something like:
    > > >
    > > > Private Sub Combobox11_AfterUpdate()
    > > >
    > > > Me.MyTextBox = Me.combobox11
    > > >
    > > > End Sub
    > > >
    > > > (replace MyTextBox with the appropriate name)
    > > >
    > > > --
    > > > Doug Steele, Microsoft Access MVP
    > > > http://I.Am/DougSteele
    > > > (no private e-mails, please)
    > > >
    > > >
    > > > "Sarah at DaVita" <s.petterson@davita.com.(donotspam)> wrote in message
    > > > news:E660AFB8-4A6C-4816-9DDF-CC3CBE38FE71@microsoft.com...
    > > > > The user goes to the form and find the item they need in a drop down

    > list.
    > > > > So if they select 'Yada' and its UID is 17 I have put =combobox11 the
    > > > > field
    > > > > that corrasponds to the UID in the table I want updated. When I look

    > into
    > > > > the table after I save the record that column is null - UID 17 just

    > shows
    > > > > in
    > > > > the form but doesn't get to the table. Confusing because I thought if

    > you
    > > > > see it in the form and save it will write to the table. I am fairly

    > new
    > > > > at
    > > > > this so please excuse the rambling.
    > > > >
    > > > > "Douglas J. Steele" wrote:
    > > > >
    > > > >> How are you prompting for the input now?
    > > > >>
    > > > >> You may have to put code in your form to transfer that value to the
    > > > >> table.
    > > > >>
    > > > >> --
    > > > >> Doug Steele, Microsoft Access MVP
    > > > >> http://I.Am/DougSteele
    > > > >> (no private e-mails, please)
    > > > >>
    > > > >>
    > > > >> "Sarah at DaVita" <s.petterson@davita.com.(donotspam)> wrote in

    > message
    > > > >> news:B53ABD57-CC40-4FE1-8AD2-FE4F1435D0B3@microsoft.com...
    > > > >> > The lookup I do now requires human intervention. If I do not get

    > the
    > > > >> > UID
    > > > >> > stored as a forgein key in table b then everytime it is needed it

    > will
    > > > >> > require human intervention. I am taking two unrelated pieces of
    > > > >> > information
    > > > >> > and relating them for future use.
    > > > >> >
    > > > >> > "Douglas J. Steele" wrote:
    > > > >> >
    > > > >> >> If you already have some means of looking up the value in the

    > other
    > > > >> >> table,
    > > > >> >> you don't need to store the looked-up value as well.
    > > > >> >>
    > > > >> >> --
    > > > >> >> Doug Steele, Microsoft Access MVP
    > > > >> >> http://I.Am/DougSteele
    > > > >> >> (no private e-mails, please)
    > > > >> >>
    > > > >> >>
    > > > >> >> "Sarah at DaVita" <s.petterson@davita.com.(donotspam)> wrote in
    > > > >> >> message
    > > > >> >> news:3AE9DB41-9CB8-4381-94EA-EDD6C15177C4@microsoft.com...
    > > > >> >> > Not duplicate data - I am looking up something in table a by its
    > > > >> >> > description-
    > > > >> >> > grabing the unique id and entering the unique id into table b.
    > > > >> >> >
    > > > >> >> > "Douglas J. Steele" wrote:
    > > > >> >> >
    > > > >> >> >> Why do you want to duplicate data between the two tables?
    > > > >> >> >>
    > > > >> >> >> --
    > > > >> >> >> Doug Steele, Microsoft Access MVP
    > > > >> >> >> http://I.Am/DougSteele
    > > > >> >> >> (no private e-mails, please)
    > > > >> >> >>
    > > > >> >> >>
    > > > >> >> >> "Sarah at DaVita" <Sarah at DaVita@discussions.microsoft.com>

    > wrote
    > > > >> >> >> in
    > > > >> >> >> message

    > news:7972EC23-28D8-4750-9BB2-932E93D14AF0@microsoft.com...
    > > > >> >> >> > In a form I have a lookup in the header that goes to table a.

    > In
    > > > >> >> >> > the
    > > > >> >> >> > detail
    > > > >> >> >> > I then say another field is equal to the the field just

    > looked up
    > > > >> >> >> > in
    > > > >> >> >> > table
    > > > >> >> >> > a.
    > > > >> >> >> > I want this to be entered into table b. The form returns the
    > > > >> >> >> > data I
    > > > >> >> >> > want
    > > > >> >> >> > but will not enter the result into table b. Has anyone
    > > > >> >> >> > experienced
    > > > >> >> >> > this
    > > > >> >> >> > before? If so, how did you overcome it?
    > > > >> >> >> > Thanks
    > > > >> >> >> > Sarah
    > > > >> >> >>
    > > > >> >> >>
    > > > >> >> >>
    > > > >> >>
    > > > >> >>
    > > > >> >>
    > > > >>
    > > > >>
    > > > >>
    > > >
    > > >
    > > >

    >
    >
    >
     
  13. Douglas J Steele

    Douglas J Steele
    Expand Collapse
    Guest

    What's the ControlSource for field ptnr_id?

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no e-mails, please!)


    "Sarah at DaVita" <s.petterson@davita.com.(donotspam)> wrote in message
    news:8CD59847-90DC-4738-8DF1-F2B2EEDF79AA@microsoft.com...
    > It now puts the id into the field on the form but still does not put it

    into
    > the table.
    > ownership is the table I want to update with the ptnr_id.
    > Partner addresses is the table the data is coming from.
    >
    > "Douglas J Steele" wrote:
    >
    > > What is ownership: a table or a form? If it's a form, is it the form on
    > > which the combo box exists as well?
    > >
    > > If it's a table, is it the table that constitutes the recordsource for

    the
    > > form on which the combo box exists?
    > >
    > > You left out the Me's in your code: you need those to ensure that Access
    > > realizes that you're talking about objects associated with your form,

    and
    > > not variables.
    > >
    > > Try:
    > >
    > > Private Sub Partner_AfterUpdate()
    > > Me![ptnr_ID] = Me!Partner
    > > End Sub
    > >
    > > If that doesn't work, post back, answering the questions above.
    > >
    > > --
    > > Doug Steele, Microsoft Access MVP
    > > http://I.Am/DougSteele
    > > (no e-mails, please!)
    > >
    > >
    > > "Sarah at DaVita" <s.petterson@davita.com.(donotspam)> wrote in message
    > > news:0D05FDE7-B66E-451E-A242-F17D539FB65C@microsoft.com...
    > > > The name of the field I am updating is ownership.ptrn_id. The data I

    want
    > > in
    > > > that field is coming from partner addresses.ptrn_id. The name of the

    > > combo
    > > > box that I look up the data in is partner - it looks into the partner
    > > > addresses table for the ptrn_id. In the form I put in the combo box
    > > > representing the ownership.ptrn_id the following:
    > > > Private Sub Partner_AfterUpdate()
    > > > [Ownership]![ptnr_ID] = Partner
    > > > End Sub
    > > > It errors out. ??????
    > > > Thanks in advance for your help on this.
    > > >
    > > >
    > > >
    > > > "Douglas J. Steele" wrote:
    > > >
    > > > > If you've got "=combobox11" as the control source of the text box,

    > > that's
    > > > > why it's not going into your table.
    > > > >
    > > > > Set the control source to the name of the field in the underlying

    > > recordset.
    > > > > In the AfterUpdate event of the combobox, put something like:
    > > > >
    > > > > Private Sub Combobox11_AfterUpdate()
    > > > >
    > > > > Me.MyTextBox = Me.combobox11
    > > > >
    > > > > End Sub
    > > > >
    > > > > (replace MyTextBox with the appropriate name)
    > > > >
    > > > > --
    > > > > Doug Steele, Microsoft Access MVP
    > > > > http://I.Am/DougSteele
    > > > > (no private e-mails, please)
    > > > >
    > > > >
    > > > > "Sarah at DaVita" <s.petterson@davita.com.(donotspam)> wrote in

    message
    > > > > news:E660AFB8-4A6C-4816-9DDF-CC3CBE38FE71@microsoft.com...
    > > > > > The user goes to the form and find the item they need in a drop

    down
    > > list.
    > > > > > So if they select 'Yada' and its UID is 17 I have put =combobox11

    the
    > > > > > field
    > > > > > that corrasponds to the UID in the table I want updated. When I

    look
    > > into
    > > > > > the table after I save the record that column is null - UID 17

    just
    > > shows
    > > > > > in
    > > > > > the form but doesn't get to the table. Confusing because I

    thought if
    > > you
    > > > > > see it in the form and save it will write to the table. I am

    fairly
    > > new
    > > > > > at
    > > > > > this so please excuse the rambling.
    > > > > >
    > > > > > "Douglas J. Steele" wrote:
    > > > > >
    > > > > >> How are you prompting for the input now?
    > > > > >>
    > > > > >> You may have to put code in your form to transfer that value to

    the
    > > > > >> table.
    > > > > >>
    > > > > >> --
    > > > > >> Doug Steele, Microsoft Access MVP
    > > > > >> http://I.Am/DougSteele
    > > > > >> (no private e-mails, please)
    > > > > >>
    > > > > >>
    > > > > >> "Sarah at DaVita" <s.petterson@davita.com.(donotspam)> wrote in

    > > message
    > > > > >> news:B53ABD57-CC40-4FE1-8AD2-FE4F1435D0B3@microsoft.com...
    > > > > >> > The lookup I do now requires human intervention. If I do not

    get
    > > the
    > > > > >> > UID
    > > > > >> > stored as a forgein key in table b then everytime it is needed

    it
    > > will
    > > > > >> > require human intervention. I am taking two unrelated pieces

    of
    > > > > >> > information
    > > > > >> > and relating them for future use.
    > > > > >> >
    > > > > >> > "Douglas J. Steele" wrote:
    > > > > >> >
    > > > > >> >> If you already have some means of looking up the value in the

    > > other
    > > > > >> >> table,
    > > > > >> >> you don't need to store the looked-up value as well.
    > > > > >> >>
    > > > > >> >> --
    > > > > >> >> Doug Steele, Microsoft Access MVP
    > > > > >> >> http://I.Am/DougSteele
    > > > > >> >> (no private e-mails, please)
    > > > > >> >>
    > > > > >> >>
    > > > > >> >> "Sarah at DaVita" <s.petterson@davita.com.(donotspam)> wrote

    in
    > > > > >> >> message
    > > > > >> >> news:3AE9DB41-9CB8-4381-94EA-EDD6C15177C4@microsoft.com...
    > > > > >> >> > Not duplicate data - I am looking up something in table a by

    its
    > > > > >> >> > description-
    > > > > >> >> > grabing the unique id and entering the unique id into table

    b.
    > > > > >> >> >
    > > > > >> >> > "Douglas J. Steele" wrote:
    > > > > >> >> >
    > > > > >> >> >> Why do you want to duplicate data between the two tables?
    > > > > >> >> >>
    > > > > >> >> >> --
    > > > > >> >> >> Doug Steele, Microsoft Access MVP
    > > > > >> >> >> http://I.Am/DougSteele
    > > > > >> >> >> (no private e-mails, please)
    > > > > >> >> >>
    > > > > >> >> >>
    > > > > >> >> >> "Sarah at DaVita" <Sarah at

    DaVita@discussions.microsoft.com>
    > > wrote
    > > > > >> >> >> in
    > > > > >> >> >> message

    > > news:7972EC23-28D8-4750-9BB2-932E93D14AF0@microsoft.com...
    > > > > >> >> >> > In a form I have a lookup in the header that goes to

    table a.
    > > In
    > > > > >> >> >> > the
    > > > > >> >> >> > detail
    > > > > >> >> >> > I then say another field is equal to the the field just

    > > looked up
    > > > > >> >> >> > in
    > > > > >> >> >> > table
    > > > > >> >> >> > a.
    > > > > >> >> >> > I want this to be entered into table b. The form returns

    the
    > > > > >> >> >> > data I
    > > > > >> >> >> > want
    > > > > >> >> >> > but will not enter the result into table b. Has anyone
    > > > > >> >> >> > experienced
    > > > > >> >> >> > this
    > > > > >> >> >> > before? If so, how did you overcome it?
    > > > > >> >> >> > Thanks
    > > > > >> >> >> > Sarah
    > > > > >> >> >>
    > > > > >> >> >>
    > > > > >> >> >>
    > > > > >> >>
    > > > > >> >>
    > > > > >> >>
    > > > > >>
    > > > > >>
    > > > > >>
    > > > >
    > > > >
    > > > >

    > >
    > >
    > >
     
  14. Sarah at DaVita

    Sarah at DaVita
    Expand Collapse
    Guest

    it is null

    "Douglas J Steele" wrote:

    > What's the ControlSource for field ptnr_id?
    >
    > --
    > Doug Steele, Microsoft Access MVP
    > http://I.Am/DougSteele
    > (no e-mails, please!)
    >
    >
    > "Sarah at DaVita" <s.petterson@davita.com.(donotspam)> wrote in message
    > news:8CD59847-90DC-4738-8DF1-F2B2EEDF79AA@microsoft.com...
    > > It now puts the id into the field on the form but still does not put it

    > into
    > > the table.
    > > ownership is the table I want to update with the ptnr_id.
    > > Partner addresses is the table the data is coming from.
    > >
    > > "Douglas J Steele" wrote:
    > >
    > > > What is ownership: a table or a form? If it's a form, is it the form on
    > > > which the combo box exists as well?
    > > >
    > > > If it's a table, is it the table that constitutes the recordsource for

    > the
    > > > form on which the combo box exists?
    > > >
    > > > You left out the Me's in your code: you need those to ensure that Access
    > > > realizes that you're talking about objects associated with your form,

    > and
    > > > not variables.
    > > >
    > > > Try:
    > > >
    > > > Private Sub Partner_AfterUpdate()
    > > > Me![ptnr_ID] = Me!Partner
    > > > End Sub
    > > >
    > > > If that doesn't work, post back, answering the questions above.
    > > >
    > > > --
    > > > Doug Steele, Microsoft Access MVP
    > > > http://I.Am/DougSteele
    > > > (no e-mails, please!)
    > > >
    > > >
    > > > "Sarah at DaVita" <s.petterson@davita.com.(donotspam)> wrote in message
    > > > news:0D05FDE7-B66E-451E-A242-F17D539FB65C@microsoft.com...
    > > > > The name of the field I am updating is ownership.ptrn_id. The data I

    > want
    > > > in
    > > > > that field is coming from partner addresses.ptrn_id. The name of the
    > > > combo
    > > > > box that I look up the data in is partner - it looks into the partner
    > > > > addresses table for the ptrn_id. In the form I put in the combo box
    > > > > representing the ownership.ptrn_id the following:
    > > > > Private Sub Partner_AfterUpdate()
    > > > > [Ownership]![ptnr_ID] = Partner
    > > > > End Sub
    > > > > It errors out. ??????
    > > > > Thanks in advance for your help on this.
    > > > >
    > > > >
    > > > >
    > > > > "Douglas J. Steele" wrote:
    > > > >
    > > > > > If you've got "=combobox11" as the control source of the text box,
    > > > that's
    > > > > > why it's not going into your table.
    > > > > >
    > > > > > Set the control source to the name of the field in the underlying
    > > > recordset.
    > > > > > In the AfterUpdate event of the combobox, put something like:
    > > > > >
    > > > > > Private Sub Combobox11_AfterUpdate()
    > > > > >
    > > > > > Me.MyTextBox = Me.combobox11
    > > > > >
    > > > > > End Sub
    > > > > >
    > > > > > (replace MyTextBox with the appropriate name)
    > > > > >
    > > > > > --
    > > > > > Doug Steele, Microsoft Access MVP
    > > > > > http://I.Am/DougSteele
    > > > > > (no private e-mails, please)
    > > > > >
    > > > > >
    > > > > > "Sarah at DaVita" <s.petterson@davita.com.(donotspam)> wrote in

    > message
    > > > > > news:E660AFB8-4A6C-4816-9DDF-CC3CBE38FE71@microsoft.com...
    > > > > > > The user goes to the form and find the item they need in a drop

    > down
    > > > list.
    > > > > > > So if they select 'Yada' and its UID is 17 I have put =combobox11

    > the
    > > > > > > field
    > > > > > > that corrasponds to the UID in the table I want updated. When I

    > look
    > > > into
    > > > > > > the table after I save the record that column is null - UID 17

    > just
    > > > shows
    > > > > > > in
    > > > > > > the form but doesn't get to the table. Confusing because I

    > thought if
    > > > you
    > > > > > > see it in the form and save it will write to the table. I am

    > fairly
    > > > new
    > > > > > > at
    > > > > > > this so please excuse the rambling.
    > > > > > >
    > > > > > > "Douglas J. Steele" wrote:
    > > > > > >
    > > > > > >> How are you prompting for the input now?
    > > > > > >>
    > > > > > >> You may have to put code in your form to transfer that value to

    > the
    > > > > > >> table.
    > > > > > >>
    > > > > > >> --
    > > > > > >> Doug Steele, Microsoft Access MVP
    > > > > > >> http://I.Am/DougSteele
    > > > > > >> (no private e-mails, please)
    > > > > > >>
    > > > > > >>
    > > > > > >> "Sarah at DaVita" <s.petterson@davita.com.(donotspam)> wrote in
    > > > message
    > > > > > >> news:B53ABD57-CC40-4FE1-8AD2-FE4F1435D0B3@microsoft.com...
    > > > > > >> > The lookup I do now requires human intervention. If I do not

    > get
    > > > the
    > > > > > >> > UID
    > > > > > >> > stored as a forgein key in table b then everytime it is needed

    > it
    > > > will
    > > > > > >> > require human intervention. I am taking two unrelated pieces

    > of
    > > > > > >> > information
    > > > > > >> > and relating them for future use.
    > > > > > >> >
    > > > > > >> > "Douglas J. Steele" wrote:
    > > > > > >> >
    > > > > > >> >> If you already have some means of looking up the value in the
    > > > other
    > > > > > >> >> table,
    > > > > > >> >> you don't need to store the looked-up value as well.
    > > > > > >> >>
    > > > > > >> >> --
    > > > > > >> >> Doug Steele, Microsoft Access MVP
    > > > > > >> >> http://I.Am/DougSteele
    > > > > > >> >> (no private e-mails, please)
    > > > > > >> >>
    > > > > > >> >>
    > > > > > >> >> "Sarah at DaVita" <s.petterson@davita.com.(donotspam)> wrote

    > in
    > > > > > >> >> message
    > > > > > >> >> news:3AE9DB41-9CB8-4381-94EA-EDD6C15177C4@microsoft.com...
    > > > > > >> >> > Not duplicate data - I am looking up something in table a by

    > its
    > > > > > >> >> > description-
    > > > > > >> >> > grabing the unique id and entering the unique id into table

    > b.
    > > > > > >> >> >
    > > > > > >> >> > "Douglas J. Steele" wrote:
    > > > > > >> >> >
    > > > > > >> >> >> Why do you want to duplicate data between the two tables?
    > > > > > >> >> >>
    > > > > > >> >> >> --
    > > > > > >> >> >> Doug Steele, Microsoft Access MVP
    > > > > > >> >> >> http://I.Am/DougSteele
    > > > > > >> >> >> (no private e-mails, please)
    > > > > > >> >> >>
    > > > > > >> >> >>
    > > > > > >> >> >> "Sarah at DaVita" <Sarah at

    > DaVita@discussions.microsoft.com>
    > > > wrote
    > > > > > >> >> >> in
    > > > > > >> >> >> message
    > > > news:7972EC23-28D8-4750-9BB2-932E93D14AF0@microsoft.com...
    > > > > > >> >> >> > In a form I have a lookup in the header that goes to

    > table a.
    > > > In
    > > > > > >> >> >> > the
    > > > > > >> >> >> > detail
    > > > > > >> >> >> > I then say another field is equal to the the field just
    > > > looked up
    > > > > > >> >> >> > in
    > > > > > >> >> >> > table
    > > > > > >> >> >> > a.
    > > > > > >> >> >> > I want this to be entered into table b. The form returns

    > the
    > > > > > >> >> >> > data I
    > > > > > >> >> >> > want
    > > > > > >> >> >> > but will not enter the result into table b. Has anyone
    > > > > > >> >> >> > experienced
    > > > > > >> >> >> > this
    > > > > > >> >> >> > before? If so, how did you overcome it?
    > > > > > >> >> >> > Thanks
    > > > > > >> >> >> > Sarah
    > > > > > >> >> >>
    > > > > > >> >> >>
    > > > > > >> >> >>
    > > > > > >> >>
    > > > > > >> >>
    > > > > > >> >>
    > > > > > >>
    > > > > > >>
    > > > > > >>
    > > > > >
    > > > > >
    > > > > >
    > > >
    > > >
    > > >

    >
    >
    >
     
  15. Douglas J Steele

    Douglas J Steele
    Expand Collapse
    Guest

    As I said before, "Set the control source to the name of the field in the
    underlying recordset."

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no e-mails, please!)


    "Sarah at DaVita" <s.petterson@davita.com.(donotspam)> wrote in message
    news:D5137100-FDD4-48B9-88E2-EAE809386B80@microsoft.com...
    > it is null
    >
    > "Douglas J Steele" wrote:
    >
    > > What's the ControlSource for field ptnr_id?
    > >
    > > --
    > > Doug Steele, Microsoft Access MVP
    > > http://I.Am/DougSteele
    > > (no e-mails, please!)
    > >
    > >
    > > "Sarah at DaVita" <s.petterson@davita.com.(donotspam)> wrote in message
    > > news:8CD59847-90DC-4738-8DF1-F2B2EEDF79AA@microsoft.com...
    > > > It now puts the id into the field on the form but still does not put

    it
    > > into
    > > > the table.
    > > > ownership is the table I want to update with the ptnr_id.
    > > > Partner addresses is the table the data is coming from.
    > > >
    > > > "Douglas J Steele" wrote:
    > > >
    > > > > What is ownership: a table or a form? If it's a form, is it the form

    on
    > > > > which the combo box exists as well?
    > > > >
    > > > > If it's a table, is it the table that constitutes the recordsource

    for
    > > the
    > > > > form on which the combo box exists?
    > > > >
    > > > > You left out the Me's in your code: you need those to ensure that

    Access
    > > > > realizes that you're talking about objects associated with your

    form,
    > > and
    > > > > not variables.
    > > > >
    > > > > Try:
    > > > >
    > > > > Private Sub Partner_AfterUpdate()
    > > > > Me![ptnr_ID] = Me!Partner
    > > > > End Sub
    > > > >
    > > > > If that doesn't work, post back, answering the questions above.
    > > > >
    > > > > --
    > > > > Doug Steele, Microsoft Access MVP
    > > > > http://I.Am/DougSteele
    > > > > (no e-mails, please!)
    > > > >
    > > > >
    > > > > "Sarah at DaVita" <s.petterson@davita.com.(donotspam)> wrote in

    message
    > > > > news:0D05FDE7-B66E-451E-A242-F17D539FB65C@microsoft.com...
    > > > > > The name of the field I am updating is ownership.ptrn_id. The

    data I
    > > want
    > > > > in
    > > > > > that field is coming from partner addresses.ptrn_id. The name of

    the
    > > > > combo
    > > > > > box that I look up the data in is partner - it looks into the

    partner
    > > > > > addresses table for the ptrn_id. In the form I put in the combo

    box
    > > > > > representing the ownership.ptrn_id the following:
    > > > > > Private Sub Partner_AfterUpdate()
    > > > > > [Ownership]![ptnr_ID] = Partner
    > > > > > End Sub
    > > > > > It errors out. ??????
    > > > > > Thanks in advance for your help on this.
    > > > > >
    > > > > >
    > > > > >
    > > > > > "Douglas J. Steele" wrote:
    > > > > >
    > > > > > > If you've got "=combobox11" as the control source of the text

    box,
    > > > > that's
    > > > > > > why it's not going into your table.
    > > > > > >
    > > > > > > Set the control source to the name of the field in the

    underlying
    > > > > recordset.
    > > > > > > In the AfterUpdate event of the combobox, put something like:
    > > > > > >
    > > > > > > Private Sub Combobox11_AfterUpdate()
    > > > > > >
    > > > > > > Me.MyTextBox = Me.combobox11
    > > > > > >
    > > > > > > End Sub
    > > > > > >
    > > > > > > (replace MyTextBox with the appropriate name)
    > > > > > >
    > > > > > > --
    > > > > > > Doug Steele, Microsoft Access MVP
    > > > > > > http://I.Am/DougSteele
    > > > > > > (no private e-mails, please)
    > > > > > >
    > > > > > >
    > > > > > > "Sarah at DaVita" <s.petterson@davita.com.(donotspam)> wrote in

    > > message
    > > > > > > news:E660AFB8-4A6C-4816-9DDF-CC3CBE38FE71@microsoft.com...
    > > > > > > > The user goes to the form and find the item they need in a

    drop
    > > down
    > > > > list.
    > > > > > > > So if they select 'Yada' and its UID is 17 I have put

    =combobox11
    > > the
    > > > > > > > field
    > > > > > > > that corrasponds to the UID in the table I want updated. When

    I
    > > look
    > > > > into
    > > > > > > > the table after I save the record that column is null - UID 17

    > > just
    > > > > shows
    > > > > > > > in
    > > > > > > > the form but doesn't get to the table. Confusing because I

    > > thought if
    > > > > you
    > > > > > > > see it in the form and save it will write to the table. I am

    > > fairly
    > > > > new
    > > > > > > > at
    > > > > > > > this so please excuse the rambling.
    > > > > > > >
    > > > > > > > "Douglas J. Steele" wrote:
    > > > > > > >
    > > > > > > >> How are you prompting for the input now?
    > > > > > > >>
    > > > > > > >> You may have to put code in your form to transfer that value

    to
    > > the
    > > > > > > >> table.
    > > > > > > >>
    > > > > > > >> --
    > > > > > > >> Doug Steele, Microsoft Access MVP
    > > > > > > >> http://I.Am/DougSteele
    > > > > > > >> (no private e-mails, please)
    > > > > > > >>
    > > > > > > >>
    > > > > > > >> "Sarah at DaVita" <s.petterson@davita.com.(donotspam)> wrote

    in
    > > > > message
    > > > > > > >> news:B53ABD57-CC40-4FE1-8AD2-FE4F1435D0B3@microsoft.com...
    > > > > > > >> > The lookup I do now requires human intervention. If I do

    not
    > > get
    > > > > the
    > > > > > > >> > UID
    > > > > > > >> > stored as a forgein key in table b then everytime it is

    needed
    > > it
    > > > > will
    > > > > > > >> > require human intervention. I am taking two unrelated

    pieces
    > > of
    > > > > > > >> > information
    > > > > > > >> > and relating them for future use.
    > > > > > > >> >
    > > > > > > >> > "Douglas J. Steele" wrote:
    > > > > > > >> >
    > > > > > > >> >> If you already have some means of looking up the value in

    the
    > > > > other
    > > > > > > >> >> table,
    > > > > > > >> >> you don't need to store the looked-up value as well.
    > > > > > > >> >>
    > > > > > > >> >> --
    > > > > > > >> >> Doug Steele, Microsoft Access MVP
    > > > > > > >> >> http://I.Am/DougSteele
    > > > > > > >> >> (no private e-mails, please)
    > > > > > > >> >>
    > > > > > > >> >>
    > > > > > > >> >> "Sarah at DaVita" <s.petterson@davita.com.(donotspam)>

    wrote
    > > in
    > > > > > > >> >> message
    > > > > > > >> >> news:3AE9DB41-9CB8-4381-94EA-EDD6C15177C4@microsoft.com...
    > > > > > > >> >> > Not duplicate data - I am looking up something in table

    a by
    > > its
    > > > > > > >> >> > description-
    > > > > > > >> >> > grabing the unique id and entering the unique id into

    table
    > > b.
    > > > > > > >> >> >
    > > > > > > >> >> > "Douglas J. Steele" wrote:
    > > > > > > >> >> >
    > > > > > > >> >> >> Why do you want to duplicate data between the two

    tables?
    > > > > > > >> >> >>
    > > > > > > >> >> >> --
    > > > > > > >> >> >> Doug Steele, Microsoft Access MVP
    > > > > > > >> >> >> http://I.Am/DougSteele
    > > > > > > >> >> >> (no private e-mails, please)
    > > > > > > >> >> >>
    > > > > > > >> >> >>
    > > > > > > >> >> >> "Sarah at DaVita" <Sarah at

    > > DaVita@discussions.microsoft.com>
    > > > > wrote
    > > > > > > >> >> >> in
    > > > > > > >> >> >> message
    > > > > news:7972EC23-28D8-4750-9BB2-932E93D14AF0@microsoft.com...
    > > > > > > >> >> >> > In a form I have a lookup in the header that goes to

    > > table a.
    > > > > In
    > > > > > > >> >> >> > the
    > > > > > > >> >> >> > detail
    > > > > > > >> >> >> > I then say another field is equal to the the field

    just
    > > > > looked up
    > > > > > > >> >> >> > in
    > > > > > > >> >> >> > table
    > > > > > > >> >> >> > a.
    > > > > > > >> >> >> > I want this to be entered into table b. The form

    returns
    > > the
    > > > > > > >> >> >> > data I
    > > > > > > >> >> >> > want
    > > > > > > >> >> >> > but will not enter the result into table b. Has

    anyone
    > > > > > > >> >> >> > experienced
    > > > > > > >> >> >> > this
    > > > > > > >> >> >> > before? If so, how did you overcome it?
    > > > > > > >> >> >> > Thanks
    > > > > > > >> >> >> > Sarah
    > > > > > > >> >> >>
    > > > > > > >> >> >>
    > > > > > > >> >> >>
    > > > > > > >> >>
    > > > > > > >> >>
    > > > > > > >> >>
    > > > > > > >>
    > > > > > > >>
    > > > > > > >>
    > > > > > >
    > > > > > >
    > > > > > >
    > > > >
    > > > >
    > > > >

    > >
    > >
    > >
     
  16. Sarah at DaVita

    Sarah at DaVita
    Expand Collapse
    Guest

    Ahh. Missed that. It works. Thank you VERY MUCH!!!!!!

    "Douglas J Steele" wrote:

    > As I said before, "Set the control source to the name of the field in the
    > underlying recordset."
    >
    > --
    > Doug Steele, Microsoft Access MVP
    > http://I.Am/DougSteele
    > (no e-mails, please!)
    >
    >
    > "Sarah at DaVita" <s.petterson@davita.com.(donotspam)> wrote in message
    > news:D5137100-FDD4-48B9-88E2-EAE809386B80@microsoft.com...
    > > it is null
    > >
    > > "Douglas J Steele" wrote:
    > >
    > > > What's the ControlSource for field ptnr_id?
    > > >
    > > > --
    > > > Doug Steele, Microsoft Access MVP
    > > > http://I.Am/DougSteele
    > > > (no e-mails, please!)
    > > >
    > > >
    > > > "Sarah at DaVita" <s.petterson@davita.com.(donotspam)> wrote in message
    > > > news:8CD59847-90DC-4738-8DF1-F2B2EEDF79AA@microsoft.com...
    > > > > It now puts the id into the field on the form but still does not put

    > it
    > > > into
    > > > > the table.
    > > > > ownership is the table I want to update with the ptnr_id.
    > > > > Partner addresses is the table the data is coming from.
    > > > >
    > > > > "Douglas J Steele" wrote:
    > > > >
    > > > > > What is ownership: a table or a form? If it's a form, is it the form

    > on
    > > > > > which the combo box exists as well?
    > > > > >
    > > > > > If it's a table, is it the table that constitutes the recordsource

    > for
    > > > the
    > > > > > form on which the combo box exists?
    > > > > >
    > > > > > You left out the Me's in your code: you need those to ensure that

    > Access
    > > > > > realizes that you're talking about objects associated with your

    > form,
    > > > and
    > > > > > not variables.
    > > > > >
    > > > > > Try:
    > > > > >
    > > > > > Private Sub Partner_AfterUpdate()
    > > > > > Me![ptnr_ID] = Me!Partner
    > > > > > End Sub
    > > > > >
    > > > > > If that doesn't work, post back, answering the questions above.
    > > > > >
    > > > > > --
    > > > > > Doug Steele, Microsoft Access MVP
    > > > > > http://I.Am/DougSteele
    > > > > > (no e-mails, please!)
    > > > > >
    > > > > >
    > > > > > "Sarah at DaVita" <s.petterson@davita.com.(donotspam)> wrote in

    > message
    > > > > > news:0D05FDE7-B66E-451E-A242-F17D539FB65C@microsoft.com...
    > > > > > > The name of the field I am updating is ownership.ptrn_id. The

    > data I
    > > > want
    > > > > > in
    > > > > > > that field is coming from partner addresses.ptrn_id. The name of

    > the
    > > > > > combo
    > > > > > > box that I look up the data in is partner - it looks into the

    > partner
    > > > > > > addresses table for the ptrn_id. In the form I put in the combo

    > box
    > > > > > > representing the ownership.ptrn_id the following:
    > > > > > > Private Sub Partner_AfterUpdate()
    > > > > > > [Ownership]![ptnr_ID] = Partner
    > > > > > > End Sub
    > > > > > > It errors out. ??????
    > > > > > > Thanks in advance for your help on this.
    > > > > > >
    > > > > > >
    > > > > > >
    > > > > > > "Douglas J. Steele" wrote:
    > > > > > >
    > > > > > > > If you've got "=combobox11" as the control source of the text

    > box,
    > > > > > that's
    > > > > > > > why it's not going into your table.
    > > > > > > >
    > > > > > > > Set the control source to the name of the field in the

    > underlying
    > > > > > recordset.
    > > > > > > > In the AfterUpdate event of the combobox, put something like:
    > > > > > > >
    > > > > > > > Private Sub Combobox11_AfterUpdate()
    > > > > > > >
    > > > > > > > Me.MyTextBox = Me.combobox11
    > > > > > > >
    > > > > > > > End Sub
    > > > > > > >
    > > > > > > > (replace MyTextBox with the appropriate name)
    > > > > > > >
    > > > > > > > --
    > > > > > > > Doug Steele, Microsoft Access MVP
    > > > > > > > http://I.Am/DougSteele
    > > > > > > > (no private e-mails, please)
    > > > > > > >
    > > > > > > >
    > > > > > > > "Sarah at DaVita" <s.petterson@davita.com.(donotspam)> wrote in
    > > > message
    > > > > > > > news:E660AFB8-4A6C-4816-9DDF-CC3CBE38FE71@microsoft.com...
    > > > > > > > > The user goes to the form and find the item they need in a

    > drop
    > > > down
    > > > > > list.
    > > > > > > > > So if they select 'Yada' and its UID is 17 I have put

    > =combobox11
    > > > the
    > > > > > > > > field
    > > > > > > > > that corrasponds to the UID in the table I want updated. When

    > I
    > > > look
    > > > > > into
    > > > > > > > > the table after I save the record that column is null - UID 17
    > > > just
    > > > > > shows
    > > > > > > > > in
    > > > > > > > > the form but doesn't get to the table. Confusing because I
    > > > thought if
    > > > > > you
    > > > > > > > > see it in the form and save it will write to the table. I am
    > > > fairly
    > > > > > new
    > > > > > > > > at
    > > > > > > > > this so please excuse the rambling.
    > > > > > > > >
    > > > > > > > > "Douglas J. Steele" wrote:
    > > > > > > > >
    > > > > > > > >> How are you prompting for the input now?
    > > > > > > > >>
    > > > > > > > >> You may have to put code in your form to transfer that value

    > to
    > > > the
    > > > > > > > >> table.
    > > > > > > > >>
    > > > > > > > >> --
    > > > > > > > >> Doug Steele, Microsoft Access MVP
    > > > > > > > >> http://I.Am/DougSteele
    > > > > > > > >> (no private e-mails, please)
    > > > > > > > >>
    > > > > > > > >>
    > > > > > > > >> "Sarah at DaVita" <s.petterson@davita.com.(donotspam)> wrote

    > in
    > > > > > message
    > > > > > > > >> news:B53ABD57-CC40-4FE1-8AD2-FE4F1435D0B3@microsoft.com...
    > > > > > > > >> > The lookup I do now requires human intervention. If I do

    > not
    > > > get
    > > > > > the
    > > > > > > > >> > UID
    > > > > > > > >> > stored as a forgein key in table b then everytime it is

    > needed
    > > > it
    > > > > > will
    > > > > > > > >> > require human intervention. I am taking two unrelated

    > pieces
    > > > of
    > > > > > > > >> > information
    > > > > > > > >> > and relating them for future use.
    > > > > > > > >> >
    > > > > > > > >> > "Douglas J. Steele" wrote:
    > > > > > > > >> >
    > > > > > > > >> >> If you already have some means of looking up the value in

    > the
    > > > > > other
    > > > > > > > >> >> table,
    > > > > > > > >> >> you don't need to store the looked-up value as well.
    > > > > > > > >> >>
    > > > > > > > >> >> --
    > > > > > > > >> >> Doug Steele, Microsoft Access MVP
    > > > > > > > >> >> http://I.Am/DougSteele
    > > > > > > > >> >> (no private e-mails, please)
    > > > > > > > >> >>
    > > > > > > > >> >>
    > > > > > > > >> >> "Sarah at DaVita" <s.petterson@davita.com.(donotspam)>

    > wrote
    > > > in
    > > > > > > > >> >> message
    > > > > > > > >> >> news:3AE9DB41-9CB8-4381-94EA-EDD6C15177C4@microsoft.com...
    > > > > > > > >> >> > Not duplicate data - I am looking up something in table

    > a by
    > > > its
    > > > > > > > >> >> > description-
    > > > > > > > >> >> > grabing the unique id and entering the unique id into

    > table
    > > > b.
    > > > > > > > >> >> >
    > > > > > > > >> >> > "Douglas J. Steele" wrote:
    > > > > > > > >> >> >
    > > > > > > > >> >> >> Why do you want to duplicate data between the two

    > tables?
    > > > > > > > >> >> >>
    > > > > > > > >> >> >> --
    > > > > > > > >> >> >> Doug Steele, Microsoft Access MVP
    > > > > > > > >> >> >> http://I.Am/DougSteele
    > > > > > > > >> >> >> (no private e-mails, please)
    > > > > > > > >> >> >>
    > > > > > > > >> >> >>
    > > > > > > > >> >> >> "Sarah at DaVita" <Sarah at
    > > > DaVita@discussions.microsoft.com>
    > > > > > wrote
    > > > > > > > >> >> >> in
    > > > > > > > >> >> >> message
    > > > > > news:7972EC23-28D8-4750-9BB2-932E93D14AF0@microsoft.com...
    > > > > > > > >> >> >> > In a form I have a lookup in the header that goes to
    > > > table a.
    > > > > > In
    > > > > > > > >> >> >> > the
    > > > > > > > >> >> >> > detail
    > > > > > > > >> >> >> > I then say another field is equal to the the field

    > just
    > > > > > looked up
    > > > > > > > >> >> >> > in
    > > > > > > > >> >> >> > table
    > > > > > > > >> >> >> > a.
    > > > > > > > >> >> >> > I want this to be entered into table b. The form

    > returns
    > > > the
    > > > > > > > >> >> >> > data I
    > > > > > > > >> >> >> > want
    > > > > > > > >> >> >> > but will not enter the result into table b. Has

    > anyone
    > > > > > > > >> >> >> > experienced
    > > > > > > > >> >> >> > this
    > > > > > > > >> >> >> > before? If so, how did you overcome it?
    > > > > > > > >> >> >> > Thanks
    > > > > > > > >> >> >> > Sarah
    > > > > > > > >> >> >>
    > > > > > > > >> >> >>
    > > > > > > > >> >> >>
    > > > > > > > >> >>
    > > > > > > > >> >>
    > > > > > > > >> >>
    > > > > > > > >>
    > > > > > > > >>
    > > > > > > > >>
    > > > > > > >
    > > > > > > >
    > > > > > > >
    > > > > >
    > > > > >
    > > > > >
    > > >
    > > >
    > > >

    >
    >
    >
     

Share This Page