Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2004
    Posts
    77

    Unanswered: Copy data from one form to another via a button click

    I have a database with two forms - Form1 is a lookup form which returns linked Oracle data; Form2 is a lookup and data entry form which returns data from another Access table. When I key-in an address on Form1 it returns the parcel ID (ParID). I then copy the ParID from Form1 to Form2, which returns ownership data from a linked Access table. What I want is a button on Form1 that when I click, it copies the data from ParID to ParID in Form2. Any suggestions would be greatly appreciated.

    Thanks,
    SKK

  2. #2
    Join Date
    Feb 2004
    Posts
    142

    Re: Copy data from one form to another via a button click

    Originally posted by esskaykay
    I have a database with two forms - Form1 is a lookup form which returns linked Oracle data; Form2 is a lookup and data entry form which returns data from another Access table. When I key-in an address on Form1 it returns the parcel ID (ParID). I then copy the ParID from Form1 to Form2, which returns ownership data from a linked Access table. What I want is a button on Form1 that when I click, it copies the data from ParID to ParID in Form2. Any suggestions would be greatly appreciated.

    Thanks,
    SKK
    on the click event and asuming the second form is open
    forms!Form2!ParID = me!ParID
    if Form2 is a bound form then It will be a bit tougher
    setup a combobox with the wizard to find a record on my form using this ID and create a public sub to call the afterupdate sub in this combo box

    Public Sub UpdateForm()
    call ComboboxName_AfterUpdate()
    end sub

    call it (when open) from the first forms button click event
    forms!From2.UpdateForm()

    if Form2 is not open then you can use the openargs parameter when opening the form.
    KC

  3. #3
    Join Date
    Jan 2004
    Posts
    77
    AZ KC

    Please excuse the ignorance, but where do I put the

    forms!Form2!ParID = me!ParID

    code - on a button's "on click", or in the Form1's "on click" parameters, or ??

    SKK

  4. #4
    Join Date
    Jan 2004
    Posts
    77
    AZ KC

    Disregard my request - I figured it out. The problem was I needed to add the linked table name instead of "... = me!ParID" I used

    ... = [Gis_Land.ParID]

    Thanks very much for your direction.
    SKK

Posting Permissions

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