Results 1 to 6 of 6
  1. #1
    MikiA is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2020
    Posts
    5

    Clone mine form field value to continuous subform field

    Hello,

    I have form where i call subform based on ComboBox selection.
    The subform displays the values ​​from the table determined by the selection from the combo box.
    I have a text field on the form. I want to enter a value in that field so that the same value appears in the corresponding fields in the subform, and then click the save button to save those values.


    When i set
    Code:
    =[Forms]![Form2]![Text3]
    for default value of the field in subform i got value in filed for new entry, and rest field is blank.
    Same code in control source in subform field give me data from form field, but in that case, subform field become unbound field and i cant to save that data.
    Can anyone help me with this? Does anyone have any idea?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    you can bind the subform to the master form using this field.
    subform properties:
    link master field: field3
    link child field: field3

    So every value in the master form field: text3
    will fill in also on the subform.

  3. #3
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    You can set the value in the AfterUpdate event of the combo where you select the source object for the subform control:
    Code:
    Me.sfrmYourSubform.[txtYourField]=Me.Text3
    The above will update whatever value you have in the first record of the subform to the value entered in Text3 textbox on the main form.
    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  4. #4
    MikiA is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2020
    Posts
    5
    Hello. Thanks for replay, but i got message "access object doesn't support this property or method" when i try that

  5. #5
    MikiA is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2020
    Posts
    5
    Basically, I solved the problem by the entry into a new table and from there with an update query.
    However, I am interested can be done in the way I asked....

  6. #6
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Can you please show what you tried that gave you the error? Make sure the name of the subform control and text box are right and the subform has Allow Edits =True and Data Entry =False.
    Last edited by Gicu; 04-04-2021 at 05:14 PM.
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 8
    Last Post: 11-25-2017, 12:37 PM
  2. Replies: 6
    Last Post: 05-21-2017, 01:12 PM
  3. Replies: 3
    Last Post: 11-03-2016, 06:11 AM
  4. Clone data in continuous forms
    By maddoctor in forum Forms
    Replies: 3
    Last Post: 11-19-2012, 11:57 AM
  5. Replies: 2
    Last Post: 09-12-2011, 11:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums