Form Setup

  • Thread starter nathank via AccessMonster.com
  • Start date
N

nathank via AccessMonster.com

Hello All,

I am attempting to design an Access database that will track route scheduling.
Basically what i am trying to do is allow a user choose a day of the week
from a combo box and then autopopulate a subform with that day's route
numbers and other information. Basically the each day of the week has
numerous route numbers and other information such as route driver, vehicle
number, route type that i am trying to display in a subform below a date and
day heading. I want the user to be able to assign a route driver and a
vehilce number to each route for the day. All the other info about the route
wont change so i am hoping to be able to autopopulate that info. I have my
route drivers and truck numbers in a lookup but i am haveing trouble
determining the best and easiest way to get started. I am not sure how to
set up each day with the route information linked to it so the user doenst
have to populate the redundant route info each day. Any ideas?

I am using Access 2007 and dont know too much about coding.

Thanks for any help,
Nate
 
K

Keith Wilby

nathank via AccessMonster.com said:
Hello All,

I am attempting to design an Access database that will track route
scheduling.
Basically what i am trying to do is allow a user choose a day of the week
from a combo box and then autopopulate a subform with that day's route
numbers and other information. Basically the each day of the week has
numerous route numbers and other information such as route driver, vehicle
number, route type that i am trying to display in a subform below a date
and
day heading. I want the user to be able to assign a route driver and a
vehilce number to each route for the day. All the other info about the
route
wont change so i am hoping to be able to autopopulate that info. I have
my
route drivers and truck numbers in a lookup but i am haveing trouble
determining the best and easiest way to get started. I am not sure how to
set up each day with the route information linked to it so the user doenst
have to populate the redundant route info each day. Any ideas?

You shouldn't need much (if any) code for this but you don't say what you
already have. Have you modelled the process into tables with relationships?

Keith.
www.keithwilby.co.uk
 
N

nathank via AccessMonster.com

Yes, i have my tables all setup, i am just not sure if i did it correctly. I
have tblSchedule with lookups for drivers, vehicle number, city, etc... That
is what I have so far. I am just not sure how to auto populate the subform.
(wouldnt have to be a subform i suppose. i just thought that it would be the
best way). Do i need to have a table for each day of the week with the route
numbers, route day, city etc... for each day of the week so the form has
somthing to populate from? I know that wednesday always has certain routes
assigned to it and always in the same area of town and other info that is
always the same. I am only wanting the user to have to choose the driver and
the vehicle assigned to them that day from drop downs. Otherwise all info is
the same each week.

This is type of form is bacically what i am going for.

Main Form
Date Day of the week

Subform
Bob Adams Route 5 Vehicle #6 Area
Dave Adams Route 6 Vehicle #3 Area

I would want all the routes and their areas of town to be populated when the
user chooses a day of the week from a dropdown.

Hope this helps.

Thanks again for any help.



Keith said:
Hello All,
[quoted text clipped - 15 lines]
set up each day with the route information linked to it so the user doenst
have to populate the redundant route info each day. Any ideas?

You shouldn't need much (if any) code for this but you don't say what you
already have. Have you modelled the process into tables with relationships?

Keith.
www.keithwilby.co.uk
 
K

Keith Wilby

nathank via AccessMonster.com said:
Yes, i have my tables all setup, i am just not sure if i did it correctly.
I
have tblSchedule with lookups for drivers, vehicle number, city, etc...
That
is what I have so far. I am just not sure how to auto populate the
subform.
(wouldnt have to be a subform i suppose. i just thought that it would be
the
best way). Do i need to have a table for each day of the week with the
route
numbers, route day, city etc... for each day of the week so the form has
somthing to populate from? I know that wednesday always has certain
routes
assigned to it and always in the same area of town and other info that is
always the same. I am only wanting the user to have to choose the driver
and
the vehicle assigned to them that day from drop downs. Otherwise all info
is
the same each week.

This is type of form is bacically what i am going for.

Main Form
Date Day of the week

Subform
Bob Adams Route 5 Vehicle #6 Area
Dave Adams Route 6 Vehicle #3 Area

I would want all the routes and their areas of town to be populated when
the
user chooses a day of the week from a dropdown.

It looks like you have a one-to-many relationship: for each day of the week
there are many routes. So you could have a main table "tblWeekDay" (for
example) related to tblRoutes.

tblWeekDay:
ID
DayName

tblRoutes:
ID
WeekDayID
DriverName
RouteNumber
VehicleNumber
Area

This is very simple and a bit restrictive. You might want to consider
relationships between other entities in tblWeekDay. But in this simple
example, if you have a form based on tblWeekDay and a sub-form based on
tblRoutes then you should be able to handle the data the way you want.

Sorry this is a bit rushed as I'm pushed for time at the moment, if that
doesn't help then perhaps someone else can jump in.

Regards,
Keith.
 
N

nathank via AccessMonster.com

Thanks for the help Keith.

I see what you are saying here but i am still not sure about the autopopluate
part.

Thanks
Nate

Keith said:
Yes, i have my tables all setup, i am just not sure if i did it correctly.
I
[quoted text clipped - 28 lines]
the
user chooses a day of the week from a dropdown.

It looks like you have a one-to-many relationship: for each day of the week
there are many routes. So you could have a main table "tblWeekDay" (for
example) related to tblRoutes.

tblWeekDay:
ID
DayName

tblRoutes:
ID
WeekDayID
DriverName
RouteNumber
VehicleNumber
Area

This is very simple and a bit restrictive. You might want to consider
relationships between other entities in tblWeekDay. But in this simple
example, if you have a form based on tblWeekDay and a sub-form based on
tblRoutes then you should be able to handle the data the way you want.

Sorry this is a bit rushed as I'm pushed for time at the moment, if that
doesn't help then perhaps someone else can jump in.

Regards,
Keith.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top