Conditional Execution?

  • Thread starter Braindead via AccessMonster.com
  • Start date
B

Braindead via AccessMonster.com

I am doing a database for a local garage and have built a form with a vehicle
checklist, a combobox rating and a comments section.

example Form for checklist_tbl
Item Rating Comments
RBrakes Good Good working order.
FBrakes Fair Right front due soon.
Exhaust Poor Hole in muffler.
Engine Good Excellent shape.
Battery Critical Battery dead must be
replaced
etc...

What I need is to be able to add a record in a separate table for the purpose
of generating a quote. In other words when the advisor clicks a fair rating
it adds a record in the existing planned_tbl
It would add the Item, Rating, Comments and 2008 as the prospective repair
date.
If they clicks on the Poor or Critical it would add the Item, Rating,
Comments and 2007 as the prospective repair date. The advisor would then go
to the planned_tbl form and add in addition information such as cost and part
#’s. then generate a quote, which shows both current and future work to be
done.

Thanks.
 
O

OldPro

I am doing a database for a local garage and have built a form with a vehicle
checklist, a combobox rating and a comments section.

example Form for checklist_tbl
Item Rating Comments
RBrakes Good Good working order.
FBrakes Fair Right front due soon.
Exhaust Poor Hole in muffler.
Engine Good Excellent shape.
Battery Critical Battery dead must be
replaced
etc...

What I need is to be able to add a record in a separate table for the purpose
of generating a quote. In other words when the advisor clicks a fair rating
it adds a record in the existing planned_tbl
It would add the Item, Rating, Comments and 2008 as the prospective repair
date.
If they clicks on the Poor or Critical it would add the Item, Rating,
Comments and 2007 as the prospective repair date. The advisor would then go
to the planned_tbl form and add in addition information such as cost and part
#'s. then generate a quote, which shows both current and future work to be
done.

Thanks.

Adding a record when the advisor selects a rating is problematic. It
might have been clicked by mistake. A better design would be to add
the new records when the original record is saved. My recommendation
is to create a Save button, disallow automatic saves, and to put the
special code into it.
Additionally, you will need a service number that exists in both
tables and is distinct in the first table. A customer could have
multiple services, so a customer ID should also be added. I can see
the need for at least three tables; customer, service, and quote.
Personally, I would not bind (set the rowsource) of any of the forms,
but would do all of the data manipulation through code. For each
table, I would have a sub that reads the data into variables, another
sub that writes the variables to the controls on the form, another sub
that "Saves" the contents of the controls to the variables and then
saves the variables to the fields in a table. The extra control over
the end result makes up for the extra coding.
 

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