Thanks for your help so far swathip, I think I am getting out of my depth here.
I read the link you sent, and it outlines how to add a row to a repeating table by clicking a button, but I want it to happen when the form loads.
I have installed Microsoft Visual Studio Tools for Applications and I can access that if I go to the Tools/Programing/Loading Event ... Menu item, and the VSTA loads and my eyes glaze over and I am lost.
Am I close and on the right track?
The code that appears when VSTA loads is below:
using Microsoft.Office.InfoPath;
using System;
using System.Xml;
using System.Xml.XPath;
namespace IT_Job_Requests_2_1_Change_to_C_
{
public partial class FormCode
{
// Member variables are not supported in browser-enabled forms.
// Instead, write and read these values from the FormState
// dictionary using code such as the following:
//
// private object _memberVariable
// {
// get
// {
// return FormState["_memberVariable"];
// }
// set
// {
// FormState["_memberVariable"] = value;
// }
// }
// NOTE: The following procedure is required by Microsoft Office InfoPath.
// It can be modified using Microsoft Office InfoPath.
public void InternalStartup()
{
EventManager.FormEvents.Loading += new LoadingEventHandler(FormEvents_Loading);
}
public void FormEvents_Loading(object sender, LoadingEventArgs e)
{
// Write your code here.
}
}
}
I am assumeing I should try and insert the code you wrote at ther bottom where the comment says "Write your code here" ...
Fingers crossed ...