PC Review


Reply
Thread Tools Rate Thread

Auto-Fill Text box on form

 
 
Richard
Guest
Posts: n/a
 
      7th Apr 2010
I am using Windows XP and Access 2000.

My apologies for the length.

This database is used to deliver training.

I have 5 tables 'TrainingWaiting', 'TrainingSchedule', 'TrainingDuration',
'TrainingCourses', and 'TrainingTrainers'.

The field 'Course' in the table 'TrainingWaiting' holds the unique value of
the ID field in the table 'TrainingSchedule'. There is a one-to-many
relationship between the ID field in 'TrainingSchedule' and the field
'Course' in the table 'TrainingWaiting'.

I use this to enable combo boxes in forms and reports to auto-fill text
boxes with the other columns in the 'TrainingSchedule' table. For example one
form has a combo box, the control source is 'Course' and there is a SELECT
that queries the 'TrainingSchedule' table. This allows me to use
=TRACourse1.Column(5) for example to auto-fill a text box with the trainers
name form the 'TrainingSchedule' table.

The problem I have now is as follows.

The 'TrainingDuration' table has 4 fields, ID, Duration, StartTime, and
EndTime. The 'ID' field is linked to the 'Duration' field in the
'TrainingSchedule' table. Which works fine if you go into the actual Schedule
table.

What I want to be able to do is have the fields 'StartTime' and 'EndTime'
auto-fill in the various forms. The problem is the StartTime and EndTime
aren't actually in the Schedule table, they're in the Duration table.

I hope this makes sense. If not, I will try to explain further.

Thank you in advance for any help.

Richard


 
Reply With Quote
 
 
 
 
John W. Vinson
Guest
Posts: n/a
 
      7th Apr 2010
On Wed, 7 Apr 2010 13:09:03 -0700, Richard <(E-Mail Removed)>
wrote:

>I am using Windows XP and Access 2000.
>
>My apologies for the length.
>
>This database is used to deliver training.
>
>I have 5 tables 'TrainingWaiting', 'TrainingSchedule', 'TrainingDuration',
>'TrainingCourses', and 'TrainingTrainers'.
>
>The field 'Course' in the table 'TrainingWaiting' holds the unique value of
>the ID field in the table 'TrainingSchedule'. There is a one-to-many
>relationship between the ID field in 'TrainingSchedule' and the field
>'Course' in the table 'TrainingWaiting'.
>
>I use this to enable combo boxes in forms and reports to auto-fill text
>boxes with the other columns in the 'TrainingSchedule' table. For example one
>form has a combo box, the control source is 'Course' and there is a SELECT
>that queries the 'TrainingSchedule' table. This allows me to use
>=TRACourse1.Column(5) for example to auto-fill a text box with the trainers
>name form the 'TrainingSchedule' table.
>
>The problem I have now is as follows.
>
>The 'TrainingDuration' table has 4 fields, ID, Duration, StartTime, and
>EndTime. The 'ID' field is linked to the 'Duration' field in the
>'TrainingSchedule' table. Which works fine if you go into the actual Schedule
>table.
>
>What I want to be able to do is have the fields 'StartTime' and 'EndTime'
>auto-fill in the various forms. The problem is the StartTime and EndTime
>aren't actually in the Schedule table, they're in the Duration table.
>
>I hope this makes sense. If not, I will try to explain further.
>
>Thank you in advance for any help.
>
>Richard
>


What doesn't make sense is that you're storing data redundantly. If the
StartTime is stored in the TrainingDuration table, then it should not exist in
any OTHER table, unless you want to allow the StartTime to be inconsistant and
different between the two tables. Is that what you're trying to do? If so,
why? If not, what's the purpose of filling the form textboxes?

Do note that you can base the combo box on a query linking the course and the
TraningDuration tables, so that all of the fields in both tables are available
for viewing.
--

John W. Vinson [MVP]
 
Reply With Quote
 
golfinray
Guest
Posts: n/a
 
      7th Apr 2010
You are going to need some sort of link between "Duration" and the "Schedule"
table then you can add a subform for start and end times.
--
Milton Purdy
ACCESS
State of Arkansas


"Richard" wrote:

> I am using Windows XP and Access 2000.
>
> My apologies for the length.
>
> This database is used to deliver training.
>
> I have 5 tables 'TrainingWaiting', 'TrainingSchedule', 'TrainingDuration',
> 'TrainingCourses', and 'TrainingTrainers'.
>
> The field 'Course' in the table 'TrainingWaiting' holds the unique value of
> the ID field in the table 'TrainingSchedule'. There is a one-to-many
> relationship between the ID field in 'TrainingSchedule' and the field
> 'Course' in the table 'TrainingWaiting'.
>
> I use this to enable combo boxes in forms and reports to auto-fill text
> boxes with the other columns in the 'TrainingSchedule' table. For example one
> form has a combo box, the control source is 'Course' and there is a SELECT
> that queries the 'TrainingSchedule' table. This allows me to use
> =TRACourse1.Column(5) for example to auto-fill a text box with the trainers
> name form the 'TrainingSchedule' table.
>
> The problem I have now is as follows.
>
> The 'TrainingDuration' table has 4 fields, ID, Duration, StartTime, and
> EndTime. The 'ID' field is linked to the 'Duration' field in the
> 'TrainingSchedule' table. Which works fine if you go into the actual Schedule
> table.
>
> What I want to be able to do is have the fields 'StartTime' and 'EndTime'
> auto-fill in the various forms. The problem is the StartTime and EndTime
> aren't actually in the Schedule table, they're in the Duration table.
>
> I hope this makes sense. If not, I will try to explain further.
>
> Thank you in advance for any help.
>
> Richard
>
>

 
Reply With Quote
 
Richard
Guest
Posts: n/a
 
      8th Apr 2010
Thanks for both of your replies.

Having the text boxes fill automatically is because the data is already in
the Schedule table, and so is just brought through from there. This displays
the data on a given form minimising mistakes and time spent on data input.

I have decided to include the StartTime and EndTime in the Schedule table,
so the Duration table isn't needed now.

Richard

"John W. Vinson" wrote:

> On Wed, 7 Apr 2010 13:09:03 -0700, Richard <(E-Mail Removed)>
> wrote:
>
> >I am using Windows XP and Access 2000.
> >
> >My apologies for the length.
> >
> >This database is used to deliver training.
> >
> >I have 5 tables 'TrainingWaiting', 'TrainingSchedule', 'TrainingDuration',
> >'TrainingCourses', and 'TrainingTrainers'.
> >
> >The field 'Course' in the table 'TrainingWaiting' holds the unique value of
> >the ID field in the table 'TrainingSchedule'. There is a one-to-many
> >relationship between the ID field in 'TrainingSchedule' and the field
> >'Course' in the table 'TrainingWaiting'.
> >
> >I use this to enable combo boxes in forms and reports to auto-fill text
> >boxes with the other columns in the 'TrainingSchedule' table. For example one
> >form has a combo box, the control source is 'Course' and there is a SELECT
> >that queries the 'TrainingSchedule' table. This allows me to use
> >=TRACourse1.Column(5) for example to auto-fill a text box with the trainers
> >name form the 'TrainingSchedule' table.
> >
> >The problem I have now is as follows.
> >
> >The 'TrainingDuration' table has 4 fields, ID, Duration, StartTime, and
> >EndTime. The 'ID' field is linked to the 'Duration' field in the
> >'TrainingSchedule' table. Which works fine if you go into the actual Schedule
> >table.
> >
> >What I want to be able to do is have the fields 'StartTime' and 'EndTime'
> >auto-fill in the various forms. The problem is the StartTime and EndTime
> >aren't actually in the Schedule table, they're in the Duration table.
> >
> >I hope this makes sense. If not, I will try to explain further.
> >
> >Thank you in advance for any help.
> >
> >Richard
> >

>
> What doesn't make sense is that you're storing data redundantly. If the
> StartTime is stored in the TrainingDuration table, then it should not exist in
> any OTHER table, unless you want to allow the StartTime to be inconsistant and
> different between the two tables. Is that what you're trying to do? If so,
> why? If not, what's the purpose of filling the form textboxes?
>
> Do note that you can base the combo box on a query linking the course and the
> TraningDuration tables, so that all of the fields in both tables are available
> for viewing.
> --
>
> John W. Vinson [MVP]
> .
>

 
Reply With Quote
 
John W. Vinson
Guest
Posts: n/a
 
      8th Apr 2010
On Wed, 7 Apr 2010 22:54:01 -0700, Richard <(E-Mail Removed)>
wrote:

>I have decided to include the StartTime and EndTime in the Schedule table,
>so the Duration table isn't needed now.
>


If the duration is the difference in time between StartTime and EndTime, it
should not be stored in any table; it can be calculated on the fly using the
DateDiff() function.
--

John W. Vinson [MVP]
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto-fill form text box based on date range Matt_F Microsoft Access 13 9th Jun 2009 04:36 PM
how to auto fill info from Word form text to header =?Utf-8?B?RXJpYw==?= Microsoft Word Document Management 1 13th Feb 2007 01:21 PM
Auto fill a text box in a form. =?Utf-8?B?Q2hhcmxpZSBPJ05laWxs?= Microsoft Frontpage 5 23rd Feb 2006 04:26 AM
How do I auto fill blanks in a text box of a data entry form =?Utf-8?B?amVycnk=?= Microsoft Access 3 13th Dec 2004 11:33 PM
Auto fill text boxes in user form by inputting data in another Finny33 Microsoft Excel Programming 1 13th Sep 2004 12:53 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:03 PM.