Hi,
I have been struggling with this problem for a week now. I have a login table that has a relationship of one to many with a look up table.
I want the data grid to be bound to the look up table (tblDoctorType). This table only has AutoID, UserID and DoctorType fields.
Lets say that the user with a UserID of 3 opens the form with the datagrid. The only way I can add a new record to the grid successfully is if I manually fill in the value 3 for the UserID field. I want to somehow hide that column on the grid and programattically fill in the field of the dataset associated with the grid with the value of the currently logged in user. In this example that would 3. I am thinking if I could do that then when I issue the m_Adapter.update(m_dataset) command it should save the record successfully.
Any ideas how I can get this to work or where I can get an example of what I am trying to do.
Thank you for all your help
Tom
I have been struggling with this problem for a week now. I have a login table that has a relationship of one to many with a look up table.
I want the data grid to be bound to the look up table (tblDoctorType). This table only has AutoID, UserID and DoctorType fields.
Lets say that the user with a UserID of 3 opens the form with the datagrid. The only way I can add a new record to the grid successfully is if I manually fill in the value 3 for the UserID field. I want to somehow hide that column on the grid and programattically fill in the field of the dataset associated with the grid with the value of the currently logged in user. In this example that would 3. I am thinking if I could do that then when I issue the m_Adapter.update(m_dataset) command it should save the record successfully.
Any ideas how I can get this to work or where I can get an example of what I am trying to do.
Thank you for all your help
Tom