Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / November 2004

Tip: Looking for answers? Try searching our database.

Automatically create new record in a repeating table

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jon Westmore - 23 Nov 2004 21:02 GMT
Hi Everyone,

I've created a repeating table on my form with 4 fields to fill out.  After
filling out a field, a user will typically tab to the next field to fill in
that value.  When the user adds a value to the forth field, I would like the
repeating table to automatically start a new record in the table (Similar to
how Microsoft Access behaves when you've filled out a record in one of its
tables).  Does anyone know if this is possible and if so, how to do it?

Thanks,
Jon
Greg Collins [InfoPath MVP] - 24 Nov 2004 00:38 GMT
You will need to use an OnAfterChange event handler. You will need to write code to know the difference between a newly inserted row, a deleted row, deleted value for field4, changed value for field4, and new value for field4. It may require having a boolean flag on the row (if you have control over the schema).

Then you can either manually build the row elements and insert the new row after the current one, or you can try calling ExecuteAction() for the table.

Signature

Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com

Hi Everyone,

I've created a repeating table on my form with 4 fields to fill out.  After
filling out a field, a user will typically tab to the next field to fill in
that value.  When the user adds a value to the forth field, I would like the
repeating table to automatically start a new record in the table (Similar to
how Microsoft Access behaves when you've filled out a record in one of its
tables).  Does anyone know if this is possible and if so, how to do it?

Thanks,
Jon
Greg Collins [InfoPath MVP] - 24 Nov 2004 00:58 GMT
Adding a row to the bottom is not an issue using ExecuteAction(), but you will encounter an issue where the tab happens before the row is inserted, so the focus is not on the first field of the newly inserted row. You will need to resolve this as well.

Signature

Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com

You will need to use an OnAfterChange event handler. You will need to write code to know the difference between a newly inserted row, a deleted row, deleted value for field4, changed value for field4, and new value for field4. It may require having a boolean flag on the row (if you have control over the schema).

Then you can either manually build the row elements and insert the new row after the current one, or you can try calling ExecuteAction() for the table.

Signature

Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com

"Jon Westmore" <westmoj@reidhosp.com> wrote in message news:uAy3B$Z0EHA.2016@TK2MSFTNGP15.phx.gbl...
Hi Everyone,

I've created a repeating table on my form with 4 fields to fill out.  After
filling out a field, a user will typically tab to the next field to fill in
that value.  When the user adds a value to the forth field, I would like the
repeating table to automatically start a new record in the table (Similar to
how Microsoft Access behaves when you've filled out a record in one of its
tables).  Does anyone know if this is possible and if so, how to do it?

Thanks,
Jon

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.