Hi John,
If you see my first treat, it shows all the details of my tables. I am
storing each holiday in a different record not in a field.
I have one table named HolidaySchedule (see the fields in my original treat)
which is stored the holidays during a month or a year. then I have a nother
table named overtime (see my original treat for details) which I need to
store employees holidays worked during a month or year. an employee might
work more than one day (one holiday during a month, so I want to use a combo
box in a from to retrieve the data from Holiday Schedule, so when I pick a
holiday from a combo box, the rest columns of the Holiday schedule should
show up in the text boxes which I have in the form to show the (purpose of
holiday, type and other fields). After I should be able to store the
information my overtime table.
Any help in this regard is much appreciated. Thanks - D
> >Dear Ken,
> >The reason that I want to have more than one combo box is that most of the
[quoted text clipped - 4 lines]
> a differernt *FIELD* in your table? If so, that's the problem! You should have
> a different *RECORD* instead. How are your tables structured?
John W. Vinson - 24 Feb 2008 21:50 GMT
>Hi John,
>If you see my first treat, it shows all the details of my tables. I am
[quoted text clipped - 10 lines]
>holiday, type and other fields). After I should be able to store the
>information my overtime table.
Daoud, I use Agent to connect to the newsgroups. I read about 150 or 200 posts
a day, and answer quite a few of them.
You're not the only person posting here, by far. It's rather rude of you to
suggest that I should bring up Google Groups and search through the archives
to find your previous post.
Since you do presumably have that information available, would you please
repost it?

Signature
John W. Vinson [MVP]
Daoud Fakhry - 25 Feb 2008 02:43 GMT
Hello John,
I am sorry requesting you to find my original post, I aplogize for that.
Below you can find original post.
All masters,
I know this is very basic question. I have searched alot but couldn't get
what I need. I have a table with the following info:
HolidayTable:
- ID
- Date
- Purpose of Holiday
- Type
I have another table named Overtime where I want to keep the employee
overtime records in details. One employee might work overtime on 5 different
holidays in a month and different hours in a holiday.
OvertimeTable:
- ID
- EmployeePIN
- Date
- Purpose of Holiday
- Type
- Hours Worked
I want to creat a form where I have a combo box selecting ID or EmployeePIN
and then I should have 5 more text boxes which preview the data based on the
selection of the combo box. My combo box should retriev data from
HolidayTable. there should be more than one combo box for different holidays
and hours worked as overtime. At the end I want to update the same
information I have selected from a combo box and the rest data displayed by
text boxes should be updated into overtime table for my later use. I need to
have a detailed information of which date an employee worked and how many
hours.
thanks John,
> >Hi John,
> >If you see my first treat, it shows all the details of my tables. I am
[quoted text clipped - 20 lines]
> Since you do presumably have that information available, would you please
> repost it?
John W. Vinson - 25 Feb 2008 06:29 GMT
> At the end I want to update the same
>information I have selected from a combo box and the rest data displayed by
>text boxes
Displayed in textboxes is easy. You can put textboxes on the form with control
sources like
=cboHolidays.Column(n)
where cboHolidays is the name of the combo box control, and n is the zero
based index of the field you wish to display.
> should be updated into overtime table for my later use.
Ummmm... No.
The Purpose of the Holiday is an attribute of the holiday table. It is not an
attribute of an overtime work! All you need to store in the Overtime table is
the HolidayID or in fact just the date of the holiday. You can easily create a
Query joining the overtime table to the Holidays table to pick up the other
information about the holiday. Could you explain why you feel it necessary to
copy data into the overtime table which would be redundant there, and which
could easily be looked up?

Signature
John W. Vinson [MVP]