A
Alex Anderson
Hello Everyone,
I'm using Infopath 2007 and my backend is SQL 2005. I'm creating a vacation
leave form and in my form I have a repeating table which contains the dates,
hours, type of leave, etc... The other section of my form has Employee
number, first name, last name, and department. I don't have any issues until
I insert other record in the repeating table. I made this option because
there are times when people like to make multiple dates of leave on the same
form. I fill out the form and add my multiple enteries in the repeating
table and when I go to submit, I get an error stating Employee number does
not accept nulls.
This is true since in the database I made it so nulls are not allowed. For
troubleshooting purposes, I allow nulls and the form works however under my
primary table "Slips" there are multiple slips. I wouldn't really mind this
but the second entry in the Slips table is all blank. I've tried playing
with Master/Detail which did show some promise but that didn't work either.
Is there code I need to make it so Slips has only one record but the form
allows multiple entries when selecting multiple dates of leave? Below is how
my database is setup in SQL 2005
Slips:
SLIP_NUM_ID (Primary Key) - One-to-One relationship to leave_Record Table
EMP_NUM (Unique Index Key) - One-to-many relationship to Leave_Record table
EMP_FIRST_NAME
EMP_LAST_NAME
DEPARTMENT
Leave_Record:
SLIP_NUM_ID (Primary Key) - One-to-one relationship to Slips table
EMP_NUM (Not unique - Index key) - Many-to-one relationship to Slips table
LEAVE_TYPE
LEAVE_HOURS
LEAVE_DATES_FROM
LEAVE_DATES_TO
LEAVE_TIME_FROM
LEAVE_TIME_TO
DATE_REQUESTED
Thanks for your help!
Alex Anderson
I'm using Infopath 2007 and my backend is SQL 2005. I'm creating a vacation
leave form and in my form I have a repeating table which contains the dates,
hours, type of leave, etc... The other section of my form has Employee
number, first name, last name, and department. I don't have any issues until
I insert other record in the repeating table. I made this option because
there are times when people like to make multiple dates of leave on the same
form. I fill out the form and add my multiple enteries in the repeating
table and when I go to submit, I get an error stating Employee number does
not accept nulls.
This is true since in the database I made it so nulls are not allowed. For
troubleshooting purposes, I allow nulls and the form works however under my
primary table "Slips" there are multiple slips. I wouldn't really mind this
but the second entry in the Slips table is all blank. I've tried playing
with Master/Detail which did show some promise but that didn't work either.
Is there code I need to make it so Slips has only one record but the form
allows multiple entries when selecting multiple dates of leave? Below is how
my database is setup in SQL 2005
Slips:
SLIP_NUM_ID (Primary Key) - One-to-One relationship to leave_Record Table
EMP_NUM (Unique Index Key) - One-to-many relationship to Leave_Record table
EMP_FIRST_NAME
EMP_LAST_NAME
DEPARTMENT
Leave_Record:
SLIP_NUM_ID (Primary Key) - One-to-one relationship to Slips table
EMP_NUM (Not unique - Index key) - Many-to-one relationship to Slips table
LEAVE_TYPE
LEAVE_HOURS
LEAVE_DATES_FROM
LEAVE_DATES_TO
LEAVE_TIME_FROM
LEAVE_TIME_TO
DATE_REQUESTED
Thanks for your help!
Alex Anderson