By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,223 Members | 1,371 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,223 IT Pros & Developers. It's quick & easy.

Help setting up Ms-Access Database

P: n/a
I'm hoping that someone here can give me some assistance with a
database I'm trying to set up. My skills in Access are fairly basic,
and I'm trying to skill up, but some of the stuff is a little opaque.

I'm trying to put some data I've got on paper into Access. Recently,
I
got together with some other people marketing organic produce and
offered to do some marketing for us on a coop basis in the city.
The idea I had was to have four marketing packages for coop members
with different rates and services. For want of something better lets
call them P1, P2, P3 & P4
I'm thinking I'll need a table with the packages, and one listing the
coop members with their details. In theory, a coop member might
acquire another farm (either a new one or one from someone bailing
out) and put it on a separate package.
Which tables would have to have a relationship?
I'm thinking the packages table containing the dat about each package
would have to be related via a common field to the coop member table,
and there would probably have to be a link between that and the farm
table, through common fields -- maybe a unique ID in the coop member
table could appear in the farm table and maybe the primary key from
the package table could also appear in the farm table as a foreign
key. But am I right?
I'd also like to create a form that would list an individual coop
member's details plus any packages they own and assume that all I'd
need to do would be to ensure that there was a specified report for
the form to call. Is that right? Is 'switchboard manager' the way to
go here?
I'd also like to create a macro to automatically open the database.
I've had a bit of a look through Access and maybe I've missed it, but
could someone point me in the right direction?
Thanks in advance ...
JD
PS Further to this, it occurs to me that if I'm going to permit coop
members to have more than one package then maybe I need some sort of
transactions table in which the records would be packages actually
taken out. Each record could contain the ID from the relevant farm
(the transactions table being the 'one' and the farm being the many)
and an ID from the packages table (eg P1 to P4) where the
transactions
table could be the many.

Am I in a muddle here or on the right track?
JD

PPS ... Bob Badour suggested I clarify the following questions:

"How many packages can a farm have? "

only 1
"How many packages can a coop member have?"

in theory, unlimited, although only one per farm
"How many farms can a coop member have?"
in theory, unlimited
"How many coop members can a farm have?"
just one
Any assistance would be greatly valued.

JD

Dec 3 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On Dec 3, 11:12 am, Jeffrey Davis <jpm1...@gmail.comwrote:
I'm hoping that someone here can give me some assistance with a
database I'm trying to set up. My skills in Access are fairly basic,
and I'm trying to skill up, but some of the stuff is a little opaque.

I'm trying to put some data I've got on paper into Access. Recently,
I
got together with some other people marketing organic produce and
offered to do some marketing for us on a coop basis in the city.

The idea I had was to have four marketing packages for coop members
with different rates and services. For want of something better lets
call them P1, P2, P3 & P4

I'm thinking I'll need a table with the packages, and one listing the
coop members with their details. In theory, a coop member might
acquire another farm (either a new one or one from someone bailing
out) and put it on a separate package.

Which tables would have to have a relationship?

I'm thinking the packages table containing the dat about each package
would have to be related via a common field to the coop member table,
and there would probably have to be a link between that and the farm
table, through common fields -- maybe a unique ID in the coop member
table could appear in the farm table and maybe the primary key from
the package table could also appear in the farm table as a foreign
key. But am I right?

I'd also like to create a form that would list an individual coop
member's details plus any packages they own and assume that all I'd
need to do would be to ensure that there was a specified report for
the form to call. Is that right? Is 'switchboard manager' the way to
go here?

I'd also like to create a macro to automatically open the database.
I've had a bit of a look through Access and maybe I've missed it, but
could someone point me in the right direction?

Thanks in advance ...

JD

PS Further to this, it occurs to me that if I'm going to permit coop
members to have more than one package then maybe I need some sort of
transactions table in which the records would be packages actually
taken out. Each record could contain the ID from the relevant farm
(the transactions table being the 'one' and the farm being the many)
and an ID from the packages table (eg P1 to P4) where the
transactions
table could be the many.

Am I in a muddle here or on the right track?

JD
Ok ,,, I've done the above ... not perfect but workable (still haven't
figured out how to create the macro) ,,,

but I'm trying to build a query that calculates the sum of a number of
records selected by the meeting the value of another field.

I keep getting type mismatches when I try to insert the criterion.

If I better specified (eg by specifying the fuill field and table name
in the correct syntax), would this work?

TIA

JD

Dec 3 '07 #2

P: n/a
On Sun, 2 Dec 2007 20:15:53 -0800 (PST), Jeffrey Davis
<jp*****@gmail.comwrote:

Show us your query and the data types of the fields involved. The
error message seems to indicate you're doing something that violates
the data type rules. E.g. Sum(FirstName) would trigger this error, or
"...where FirstName=Tom" (because the quotes are missing).

To start your application, set a startup form, or create an AutoExec
macro.

-Tom.

<clip>
>
Ok ,,, I've done the above ... not perfect but workable (still haven't
figured out how to create the macro) ,,,

but I'm trying to build a query that calculates the sum of a number of
records selected by the meeting the value of another field.

I keep getting type mismatches when I try to insert the criterion.

If I better specified (eg by specifying the fuill field and table name
in the correct syntax), would this work?

TIA

JD
Dec 3 '07 #3

P: n/a
On Dec 3, 8:06 pm, Tom van Stiphout <no.spam.tom7...@cox.netwrote:
On Sun, 2 Dec 2007 20:15:53 -0800 (PST), Jeffrey Davis

<jpm1...@gmail.comwrote:

Show us your query and the data types of the fields involved. The
error message seems to indicate you're doing something that violates
the data type rules. E.g. Sum(FirstName) would trigger this error, or
"...where FirstName=Tom" (because the quotes are missing).

To start your application, set a startup form, or create an AutoExec
macro.

-Tom.

<clip>


Ok ,,, I've done the above ... not perfect but workable (still haven't
figured out how to create the macro) ,,,
but I'm trying to build a query that calculates the sum of a number of
records selected by the meeting the value of another field.
I keep getting type mismatches when I try to insert the criterion.
If I better specified (eg by specifying the fuill field and table name
in the correct syntax), would this work?
TIA
JD- Hide quoted text -

- Show quoted text -
I've just used the standard query app..

When it's run, it accurately extracts the relevant records with the
sales figures displayed for each of them.

SELECT package.Type, farms.Location, farms.farmID, farms.State,
farms.Sales
FROM farms INNER JOIN (coopMember INNER JOIN (package INNER JOIN
agreements ON package.Type = agreements.package) ON
coopMember.coopMemberID = agreements.coopMember) ON farms.farmID =
agreements.Restaurant
GROUP BY package.Type, farms.Location, farms.farmID, farms.State,
farms.Sales
HAVING (((package.Type)="p1"))

I tried to write some script to sum the three extracted records (i.e
all those with p1 as the value of the package type) in a new column,
but no dice.
In Excel, this would be fairly easy as you'd simply write an IF
referenced to the column with the p values specifying p1 and then sum
them at the bottom of the column, but in Access ...

Thanks.

JD

Dec 3 '07 #4

P: n/a
Jeffrey Davis wrote:
On Dec 3, 8:06 pm, Tom van Stiphout <no.spam.tom7...@cox.netwrote:
>>On Sun, 2 Dec 2007 20:15:53 -0800 (PST), Jeffrey Davis

<jpm1...@gmail.comwrote:

Show us your query and the data types of the fields involved. The
error message seems to indicate you're doing something that violates
the data type rules. E.g. Sum(FirstName) would trigger this error, or
"...where FirstName=Tom" (because the quotes are missing).

To start your application, set a startup form, or create an AutoExec
macro.

-Tom.

<clip>


>>>Ok ,,, I've done the above ... not perfect but workable (still haven't
figured out how to create the macro) ,,,
>>>but I'm trying to build a query that calculates the sum of a number of
records selected by the meeting the value of another field.
>>>I keep getting type mismatches when I try to insert the criterion.
>>>If I better specified (eg by specifying the fuill field and table name
in the correct syntax), would this work?
>>>TIA
>>>JD- Hide quoted text -

- Show quoted text -


I've just used the standard query app..

When it's run, it accurately extracts the relevant records with the
sales figures displayed for each of them.

SELECT package.Type, farms.Location, farms.farmID, farms.State,
farms.Sales
FROM farms INNER JOIN (coopMember INNER JOIN (package INNER JOIN
agreements ON package.Type = agreements.package) ON
coopMember.coopMemberID = agreements.coopMember) ON farms.farmID =
agreements.Restaurant
GROUP BY package.Type, farms.Location, farms.farmID, farms.State,
farms.Sales
HAVING (((package.Type)="p1"))

I tried to write some script to sum the three extracted records (i.e
all those with p1 as the value of the package type) in a new column,
but no dice.
In the Totals row of the query builder (where you see all those
GroupBys), have you considered changing the Sales column from GroupBy to
Sum?
>

In Excel, this would be fairly easy as you'd simply write an IF
referenced to the column with the p values specifying p1 and then sum
them at the bottom of the column, but in Access ...

Thanks.

JD


Dec 3 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.