Form Help

T

teelee

I was wondering if someone can assist me with this? I have 3 seperate forms
and in one column there is the same name, which is Plan name. How would I
make each form when I open automatically have the plan name showing? Is this
a relationship problem?

Thanks
 
J

John W. Vinson

I was wondering if someone can assist me with this? I have 3 seperate forms
and in one column there is the same name, which is Plan name. How would I
make each form when I open automatically have the plan name showing? Is this
a relationship problem?

Thanks

We have no way to know, because we have no idea how your tables are structured
or related, why the plan name is (apparently) redundantly included in three
tables, or what the recordsources of these forms might be.

Could you not base the forms on a Query selecting the plan? For instance, you
might have a home-made switchboard type form with a Combo Box to select the
plan, and have each of these forms based on a query using

=Forms![SwitchboardFormName]![ComboBoxName]

as a criterion; the forms would then just show the record or records for that
plan.

John W. Vinson [MVP]
 
T

teelee

What do you mean a home-made switchboard? Do I need to make a query first?

Thanks

John W. Vinson said:
I was wondering if someone can assist me with this? I have 3 seperate forms
and in one column there is the same name, which is Plan name. How would I
make each form when I open automatically have the plan name showing? Is this
a relationship problem?

Thanks

We have no way to know, because we have no idea how your tables are structured
or related, why the plan name is (apparently) redundantly included in three
tables, or what the recordsources of these forms might be.

Could you not base the forms on a Query selecting the plan? For instance, you
might have a home-made switchboard type form with a Combo Box to select the
plan, and have each of these forms based on a query using

=Forms![SwitchboardFormName]![ComboBoxName]

as a criterion; the forms would then just show the record or records for that
plan.

John W. Vinson [MVP]
 
J

John W. Vinson

What do you mean a home-made switchboard?

Lots of us don't like Microsoft's builtin Switchboard form. Instead, I'll
create an unbound Form with a listbox listing all of the other forms and
reports that I might want to open.
Do I need to make a query first?

Make the form first, and use a reference to it as a criterion in the query.

John W. Vinson [MVP]
 
T

teelee

I'm sorry to bother you it's just that this part is new to me. What do I
enter under the criterion in the query?

Thanks
 
J

John W. Vinson

I'm sorry to bother you it's just that this part is new to me. What do I
enter under the criterion in the query?

If your form is named MyForm, and the control on the form is named MyControl,
type

=[Forms]![MyForm]![MyControl]

on the Criteria line in the query design window.


John W. Vinson [MVP]
 
T

teelee

Does this include all 3 forms?

John W. Vinson said:
I'm sorry to bother you it's just that this part is new to me. What do I
enter under the criterion in the query?

If your form is named MyForm, and the control on the form is named MyControl,
type

=[Forms]![MyForm]![MyControl]

on the Criteria line in the query design window.


John W. Vinson [MVP]
 
J

John W. Vinson

Does this include all 3 forms?

Teelee, I have NO idea what these three forms are; what query or queries they
are based on; how they are similar or how they are different.

You can see your computer screen. You understand what you're trying to
accomplish. I can't and I don't.

I was suggesting that - *possibly, bearing in mind that I cannot see your
screen and do not know what you're trying to accomplish* - that you might be
able to use *one* form with *one* parameter query. Quite possibly I'm wrong,
since I don't know these things. But I wanted to suggest it for your
consideration.

If you could post some information that might help me visualize your
situation, I'll try to help.

John W. Vinson [MVP]
 
T

teelee

Thanks....Ok I have3 tables and create 3 forms from each table. I have Plan
Name in each form and table The Plan Name could be either sold as direct bill
or paid for. I'm really not sure if this is the best way to go with this.
What I want to happen is the Plan Name to be populated in the other 2 forms
when I open them. You see I have Plan Name, Sold To and Direct Bill on one
table and Plan Name and Sold to, with Cost field. I think I just really
confused in all of this. Is there another way to set this up? Any help would
be appreicated.

Thanks
 
J

John W. Vinson

Thanks....Ok I have3 tables and create 3 forms from each table. I have Plan
Name in each form and table The Plan Name could be either sold as direct bill
or paid for. I'm really not sure if this is the best way to go with this.
What I want to happen is the Plan Name to be populated in the other 2 forms
when I open them. You see I have Plan Name, Sold To and Direct Bill on one
table and Plan Name and Sold to, with Cost field. I think I just really
confused in all of this. Is there another way to set this up? Any help would
be appreicated.

Yes, I'm sure there is a better way.

I think you're getting hung up on Forms much too early in the design cycle.
You need to get your Table relationships set up correctly FIRST.

If a Plan is sold to one or more customers, and each of those customers my
either "direct bill" or "cost", you don't want three Plan tables; I don't know
your business rules, but I'd imagine that you would have a table of Plans (the
only table in your entire database which would contain the plan name); a table
of Customers; and a table of Sales, with a link to the plans table and a link
to the customers table. There might be just a yes/no field "Paid" in the sales
table, or you might have a link to yet another table of payments.

Again.... I don't know your business, so I may be blowing smoke here; but I
can say with some confidence that having three separate Plan tables
duplicating the plan name (and other plan data) is NOT the way you want to go.

John W. Vinson [MVP]
 
T

teelee

How would I link them, by relationships?

Thanks

John W. Vinson said:
Yes, I'm sure there is a better way.

I think you're getting hung up on Forms much too early in the design cycle.
You need to get your Table relationships set up correctly FIRST.

If a Plan is sold to one or more customers, and each of those customers my
either "direct bill" or "cost", you don't want three Plan tables; I don't know
your business rules, but I'd imagine that you would have a table of Plans (the
only table in your entire database which would contain the plan name); a table
of Customers; and a table of Sales, with a link to the plans table and a link
to the customers table. There might be just a yes/no field "Paid" in the sales
table, or you might have a link to yet another table of payments.

Again.... I don't know your business, so I may be blowing smoke here; but I
can say with some confidence that having three separate Plan tables
duplicating the plan name (and other plan data) is NOT the way you want to go.

John W. Vinson [MVP]
 
T

teelee

I'm sorry this is really driving me nuts. Ok I deleted Plan name from the
other 2 tables and forms, I then linked the relationships in this way...Plan
Name to Sold to on 2 nd table and sold to on 3rd table, I also added comand
buttons on the main and 2nd form to open the forms that I need to enter data
into. When I open the other 2 forms there is nothing indcated that I'm
working on the PLAN NAME. So how do I know if the data is for the Plan name?
I also have the Plan name as a combo bax, is this correct?

Thanks for all your help you've been really helpful.
 
J

John W. Vinson

other 2 tables and forms, I then linked the relationships in this way...Plan
Name to Sold to on 2 nd table and sold to on 3rd table, I also added comand
buttons on the main and 2nd form to open the forms that I need to enter data
into. When I open the other 2 forms there is nothing indcated that I'm
working on the PLAN NAME. So how do I know if the data is for the Plan name?
I also have the Plan name as a combo bax, is this correct?


STOP.

Did you read the tutorials that I've posted a couple of times? Let's try
again.

Jeff Conrad's resources page:
http://www.accessmvp.com/JConrad/accessjunkie/resources.html

The Access Web resources page:
http://www.mvps.org/access/resources/index.html

A free tutorial written by Crystal (MS Access MVP):
http://allenbrowne.com/casu-22.html

MVP Allen Browne's tutorials:
http://allenbrowne.com/links.html#Tutorials


Bear in mind - *I don't know your business*. *I don't know what your tables
represent*. They have something to do with a Plan and with customers and
sales,but *that is the entirity of my understanding of your application*,
because that's all you've posted.

My assumption - which may well be wrong, since my telepathy is apparently on
the blink today - is that you could have a Table setup like:

Plans
PlanNumber <Primary Key>
PlanName
<other information about the plan>

Customers
CustomerID <Primary Key>
LastName
FirstName
<other bio information>

Sales
SaleID <Autonumber, Primary Key>
PlanID <Link to Plans.PrimaryKey>
SaleDate <date/time of sale>
CustomerID <link to Customers>

If you're expecting to see the plan name in the sales table, you're
misunderstanding the WHOLE PURPOSE of a relational database. You don't copy
data into every table that's related to the Plan table. Instead, you *store a
link* to that table. Opening the table datasheet won't show you anything but
numbers, perhaps... but *that's ok*; the purpose of the table is to store
data, NOT to present it to human view. Data storage is one operation; data
presentation is a different operation; tables are for data storage, and Forms
and Reports are for data presentation. They will be based on Queries, and/or
use data presentation tools such as combo boxes, subforms and subreports.


John W. Vinson [MVP]
 
Top