Insert Multiple Records with Field Value - InfoPath Dev
in

InfoPath Dev

Insert Multiple Records with Field Value

Last post 03-28-2011 06:48 AM by Arthur77. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 03-18-2011 02:01 PM

    Insert Multiple Records with Field Value

    Is it possible to add 200 new records to a child table and populate a field in that table with a value from the parent table?

  • 03-22-2011 10:16 AM In reply to

    Re: Insert Multiple Records with Field Value

    Hi:

    I think we need more info on what you are trying to do to be able to help you. Are you creating a form off a database? Or do you mean you want the form to load with these items?

    Hilary Stoupa

  • 03-22-2011 01:00 PM In reply to

    Re: Insert Multiple Records with Field Value

    Hilary,

    yes, I am creating a form from an Access database with a schema:

    shape
     {select [DemographicsID],[Rating],[Paygrade],[FirstName],[LastName],[EmailAddress],[LastFourSSN],[DateOfBirth],[Gender],[TimeInGrade],[TimeInRating],[Location],[DutyType],[WorkSetting],[NEC],[Department] from [Demographics] as [Demographics]} as [Demographics]
     append
      ({select [MetricID],[DemographicsID],[TaskID],[Validation],[Difficulty],[Importance],[Frequency] from [Metrics]}
       relate [DemographicsID] TO [DemographicsID]) as [Metrics] 

    The form will collect demographic information from survey participants and populate a row within the Demographics table.  There will be a button at the bottom that will "Submit" the data and "Open" another form that allows participants to review 200 tasks from table TaskList with primary key TaskID...but that is another part of the project.  What I need for the time being is to insert 200 blank records with the DemographicID field in the Metrics table equal to the DemographicID from the Demographics table or textbox bound to this field.  In other words, perform this operation when the user selects the button at the bottom or something along those lines.

    Many thanks,

    Arthur 

  • 03-28-2011 06:48 AM In reply to

    Re: Insert Multiple Records with Field Value

    In the past when creating forms in MS Access, I was able to just write a macro with an append query that would append the values of the TaskID's into the Metrics table every time it was executed.  The macro would also execute an update pulling in a value from the form in use to get the current value of the DemographicID and update those values in the DemographicID field if the field was null.

Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.