striker83716
Technical User
This should have a very simple solution, but I am struggling to find the answer.
I have 3 tables
tblEmployee idEmployee(PK) Fname Lname Address etc
tblDate idDate(pk) DateWorked(no duplicates)
tbldetails idEmployee(PK) idDate(PK) hours AbsenceCode Comments.
I have a form frmAttendance it has 1 textbox on it txtDateWorked. This forms control record source tblDate.
Also on frmAttendance is a subform titled subfrmEmployees based off of a table (tbldetails). related on idDate
Finally I have an append query that creates a detail record for each employee, for each date
On opening of the form I want the form to open to today's date (all other dates being accessible using the navigation buttons, calendar control etc). If todays date is not in the database, I want to add the date in VB to the tblDate, then run the append query using this date, thus creating a detail record for each employee for the new date, and finally opening the frmAttendance to the newly added Current date showing all employee details.
What would my best approach to solve this
if tbldate has todays date in it goto that record if not add and append.
Thanks in advance
I have 3 tables
tblEmployee idEmployee(PK) Fname Lname Address etc
tblDate idDate(pk) DateWorked(no duplicates)
tbldetails idEmployee(PK) idDate(PK) hours AbsenceCode Comments.
I have a form frmAttendance it has 1 textbox on it txtDateWorked. This forms control record source tblDate.
Also on frmAttendance is a subform titled subfrmEmployees based off of a table (tbldetails). related on idDate
Finally I have an append query that creates a detail record for each employee, for each date
On opening of the form I want the form to open to today's date (all other dates being accessible using the navigation buttons, calendar control etc). If todays date is not in the database, I want to add the date in VB to the tblDate, then run the append query using this date, thus creating a detail record for each employee for the new date, and finally opening the frmAttendance to the newly added Current date showing all employee details.
What would my best approach to solve this
if tbldate has todays date in it goto that record if not add and append.
Thanks in advance