A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Auto-Fill Text box on form



 
 
Thread Tools Display Modes
  #1  
Old April 7th, 2010, 09:09 PM posted to microsoft.public.access.forms
Richard
external usenet poster
 
Posts: 1,419
Default Auto-Fill Text box on form

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


  #2  
Old April 7th, 2010, 09:51 PM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Auto-Fill Text box on form

On Wed, 7 Apr 2010 13:09:03 -0700, 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


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]
  #3  
Old April 7th, 2010, 09:55 PM posted to microsoft.public.access.forms
Golfinray
external usenet poster
 
Posts: 1,597
Default Auto-Fill Text box on form

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


  #4  
Old April 8th, 2010, 06:54 AM posted to microsoft.public.access.forms
Richard
external usenet poster
 
Posts: 1,419
Default Auto-Fill Text box on form

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
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]
.

  #5  
Old April 8th, 2010, 07:16 PM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Auto-Fill Text box on form

On Wed, 7 Apr 2010 22:54:01 -0700, Richard
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]
 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:22 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.