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

Help needed.

P: n/a
SB
im trying to build a database containing several products and the
product price. basically these are computer parts/products and the aim
of the database is to "build your own pc" using drop down menus on a
form and having a running sum displaying the overall total of the
"computer".

im getting there slowly, as i havent used access in maybe 10years.....

basically this is the direction im going......a table for cpu product
and price, table for hdd product & price, table for ram product and
price etc etc, and then i created a table and used the "lookupwizard" to
give me the choice! any help/guidence would b appreciated.

im also aware that access might not be the best solution for this, again
any help would b great.

Nov 12 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
"SB" <em******@blueyonder.co.uk> wrote in message
news:Lv*****************@news-binary.blueyonder.co.uk...
im trying to build a database containing several products and the
product price. basically these are computer parts/products and the aim
of the database is to "build your own pc" using drop down menus on a
form and having a running sum displaying the overall total of the
"computer".

im getting there slowly, as i havent used access in maybe 10years.....

basically this is the direction im going......a table for cpu product
and price, table for hdd product & price, table for ram product and
price etc etc, and then i created a table and used the "lookupwizard" to
give me the choice! any help/guidence would b appreciated.
Apalling! Do this, or something like it.

tblParts:
PartID (Primary Key - autonumber if you like)
PartName (values like 'Hitachi Travelstor')
Price (values like '120.00')
PartTypeID
SupplierID (maybe?)
etc.

tblPartTypes:
PartTypeID (Primary Key)
PartTypeName (values like 'Hard Disk Drive')

One to many relationship from tblPartTypes to tblParts on PartTypeID.

And also from Supplier to tblParts (maybe, that might be many to many).
im also aware that access might not be the best solution for this, again
any help would b great.


Access is just fine.

Mike
Nov 12 '05 #2

P: n/a
"SB" <em******@blueyonder.co.uk> wrote in message
news:Lv*****************@news-binary.blueyonder.co.uk...
im trying to build a database containing several products and the
product price. basically these are computer parts/products and the aim
of the database is to "build your own pc" using drop down menus on a
form and having a running sum displaying the overall total of the
"computer".

im getting there slowly, as i havent used access in maybe 10years.....

basically this is the direction im going......a table for cpu product
and price, table for hdd product & price, table for ram product and
price etc etc, and then i created a table and used the "lookupwizard" to
give me the choice! any help/guidence would b appreciated.

Access is a great solution for this, but your design needs some work. You
need all your components in a single table, otherwise you're going to have
to keep adding tables anytime you add a different component type. I suggest
tables something like this:

(Insert --> Query --> Design --> View --> SQL View to run these scripts)

create table componentTypes
(
componentType varchar(50) not null
constraint PK_componentTypes primary key
)

----------------------------------------------------

create table manufacturers
(
mfgName varchar(50) not null
constraint PK_mfgName primary key,
address varchar(255) null,
telephone varchar(50) null
)
----------------------------------------------------

create table components
(
partNbr varchar(50) not null
constraint PK_partNbr primary key,
mfgName varchar(50) not null
constraint FK_components_mfgName
references manufacturers(mfgName),
componentType varchar(50) not null
constraint FK_components_componentType
references componentTypes(componentType),
componentDescription varchar(255) null,
mfgPartNbr varchar(255) null,
listPrice money
)











Nov 12 '05 #3

P: n/a
SB
John Winterbottom wrote:
"SB" <em******@blueyonder.co.uk> wrote in message
news:Lv*****************@news-binary.blueyonder.co.uk...
im trying to build a database containing several products and the
product price. basically these are computer parts/products and the aim
of the database is to "build your own pc" using drop down menus on a
form and having a running sum displaying the overall total of the
"computer".

im getting there slowly, as i havent used access in maybe 10years.....

basically this is the direction im going......a table for cpu product
and price, table for hdd product & price, table for ram product and
price etc etc, and then i created a table and used the "lookupwizard" to
give me the choice! any help/guidence would b appreciated.


Access is a great solution for this, but your design needs some work. You
need all your components in a single table, otherwise you're going to have
to keep adding tables anytime you add a different component type. I suggest
tables something like this:

(Insert --> Query --> Design --> View --> SQL View to run these scripts)

create table componentTypes
(
componentType varchar(50) not null
constraint PK_componentTypes primary key
)

----------------------------------------------------

create table manufacturers
(
mfgName varchar(50) not null
constraint PK_mfgName primary key,
address varchar(255) null,
telephone varchar(50) null
)
----------------------------------------------------

create table components
(
partNbr varchar(50) not null
constraint PK_partNbr primary key,
mfgName varchar(50) not null
constraint FK_components_mfgName
references manufacturers(mfgName),
componentType varchar(50) not null
constraint FK_components_componentType
references componentTypes(componentType),
componentDescription varchar(255) null,
mfgPartNbr varchar(255) null,
listPrice money
)





thanks very much for feedback guys,






Nov 12 '05 #4

P: n/a
SB <em******@blueyonder.co.uk> wrote in message news:<Lv*****************@news-binary.blueyonder.co.uk>...
im trying to build a database containing several products and the
product price. basically these are computer parts/products and the aim
of the database is to "build your own pc" using drop down menus on a
form and having a running sum displaying the overall total of the
"computer".

im getting there slowly, as i havent used access in maybe 10years.....

basically this is the direction im going......a table for cpu product
and price, table for hdd product & price, table for ram product and
price etc etc, and then i created a table and used the "lookupwizard" to
give me the choice! any help/guidence would b appreciated.

im also aware that access might not be the best solution for this, again
any help would b great.


I built exactly such a DB application in 1997 for a computer store using
Access 97. I'll check the contract I signed to see if there was a five
year stipulation for sharing code. If so, I can give you a big head
start on your project. If not, I can still give you lots of hints.

James A. Fortune
Nov 12 '05 #5

P: n/a
SB
James Fortune wrote:
SB <em******@blueyonder.co.uk> wrote in message news:<Lv*****************@news-binary.blueyonder.co.uk>...
im trying to build a database containing several products and the
product price. basically these are computer parts/products and the aim
of the database is to "build your own pc" using drop down menus on a
form and having a running sum displaying the overall total of the
"computer".

im getting there slowly, as i havent used access in maybe 10years.....

basically this is the direction im going......a table for cpu product
and price, table for hdd product & price, table for ram product and
price etc etc, and then i created a table and used the "lookupwizard" to
give me the choice! any help/guidence would b appreciated.

im also aware that access might not be the best solution for this, again
any help would b great.

I built exactly such a DB application in 1997 for a computer store using
Access 97. I'll check the contract I signed to see if there was a five
year stipulation for sharing code. If so, I can give you a big head
start on your project. If not, I can still give you lots of hints.

James A. Fortune

James that would be wonderful if you can m8, im still getting there
slowly , im having a very annoying problem at the moment, im trying to
add the total of 2 fields in a form example =(text18+text19) i forget
the exact code of top of my head , but for some reason when use + sign
it simply puts the 2 figures next to each other tie 50+150 would show
50150, but when i replace the + with a - it subtracts without a problem
someone pl help me!

Nov 12 '05 #6

P: n/a
SB
James Fortune wrote:
SB <em******@blueyonder.co.uk> wrote in message news:<Lv*****************@news-binary.blueyonder.co.uk>...
im trying to build a database containing several products and the
product price. basically these are computer parts/products and the aim
of the database is to "build your own pc" using drop down menus on a
form and having a running sum displaying the overall total of the
"computer".

im getting there slowly, as i havent used access in maybe 10years.....

basically this is the direction im going......a table for cpu product
and price, table for hdd product & price, table for ram product and
price etc etc, and then i created a table and used the "lookupwizard" to
give me the choice! any help/guidence would b appreciated.

im also aware that access might not be the best solution for this, again
any help would b great.

I built exactly such a DB application in 1997 for a computer store using
Access 97. I'll check the contract I signed to see if there was a five
year stipulation for sharing code. If so, I can give you a big head
start on your project. If not, I can still give you lots of hints.

James A. Fortune

James that would be wonderful if you can m8, im still getting there
slowly , im having a very annoying problem at the moment, im trying to
add the total of 2 fields in a form example =(text18+text19) i forget
the exact code of top of my head , but for some reason when use + sign
it simply puts the 2 figures next to each other tie 50+150 would show
50150, but when i replace the + with a - it subtracts without a problem
someone pl help me!
............
i have overcome this latest problem now, proberly not the best way to
overcome it, but im no longer loosing hair by the kilo!!!!!!!

Nov 12 '05 #7

P: n/a
SB <em******@blueyonder.co.uk> wrote in message news:<OP******************@news-binary.blueyonder.co.uk>...
James Fortune wrote:
SB <em******@blueyonder.co.uk> wrote in message news:<Lv*****************@news-binary.blueyonder.co.uk>...
im trying to build a database containing several products and the
product price. basically these are computer parts/products and the aim
of the database is to "build your own pc" using drop down menus on a
form and having a running sum displaying the overall total of the
"computer".

im getting there slowly, as i havent used access in maybe 10years.....

basically this is the direction im going......a table for cpu product
and price, table for hdd product & price, table for ram product and
price etc etc, and then i created a table and used the "lookupwizard" to
give me the choice! any help/guidence would b appreciated.

im also aware that access might not be the best solution for this, again
any help would b great.

I built exactly such a DB application in 1997 for a computer store using
Access 97. I'll check the contract I signed to see if there was a five
year stipulation for sharing code. If so, I can give you a big head
start on your project. If not, I can still give you lots of hints.

James A. Fortune

James that would be wonderful if you can m8, im still getting there
slowly , im having a very annoying problem at the moment, im trying to
add the total of 2 fields in a form example =(text18+text19) i forget
the exact code of top of my head , but for some reason when use + sign
it simply puts the 2 figures next to each other tie 50+150 would show
50150, but when i replace the + with a - it subtracts without a problem
someone pl help me!
...........
i have overcome this latest problem now, proberly not the best way to
overcome it, but im no longer loosing hair by the kilo!!!!!!!


The plus-sign "+" indicates to MS Access to concatenate the two values
in the controls. That is why you are getting the 50150. To actually
obtain the sum of the two values you would need to do something like
this:
example = cint(text18) + cint(text19)
or use the appropriate datatype conversion function (clng or cdouble,
etc). I realize this doesn't explain why subtracting the two values
works ok, but I'm sure someone else can explain that one. :^)

Hope this helps.
Steve
Nov 12 '05 #8

P: n/a
SB <em******@blueyonder.co.uk> wrote in message news:<OP******************@news-binary.blueyonder.co.uk>...
James Fortune wrote:

im also aware that access might not be the best solution for this, again
any help would b great.

I built exactly such a DB application in 1997 for a computer store using
Access 97. I'll check the contract I signed to see if there was a five
year stipulation for sharing code. If so, I can give you a big head
start on your project. If not, I can still give you lots of hints.

James A. Fortune

James that would be wonderful if you can m8, im still getting there
slowly , im having a very annoying problem at the moment, im trying to
add the total of 2 fields in a form example =(text18+text19) i forget
the exact code of top of my head , but for some reason when use + sign
it simply puts the 2 figures next to each other tie 50+150 would show
50150, but when i replace the + with a - it subtracts without a problem
someone pl help me!
...........
i have overcome this latest problem now, proberly not the best way to
overcome it, but im no longer loosing hair by the kilo!!!!!!!


Sam,

I checked the contract and there is not a five year clause because
they had one of the best local law firms write it. However, I did
discover that they never finished paying for the database! The
database went into production and was sold to several computer stores.
If they won't sign a promissory note for the rest I'll have no trouble
with sending you the complete db. Regardless, I still want to help
you as much as possible with your new project.

James A. Fortune
Nov 12 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.