Help needed.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • SB

    Help needed.

    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 "lookupwiza rd" 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.

  • Mike MacSween

    #2
    Re: Help needed.

    "SB" <emailsam@bluey onder.co.uk> wrote in message
    news:LvRbc.1940 5$Id.5604@news-binary.blueyond er.co.uk...[color=blue]
    > 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 "lookupwiza rd" to
    > give me the choice! any help/guidence would b appreciated.[/color]

    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).
    [color=blue]
    > im also aware that access might not be the best solution for this, again
    > any help would b great.[/color]

    Access is just fine.

    Mike


    Comment

    • John Winterbottom

      #3
      Re: Help needed.

      "SB" <emailsam@bluey onder.co.uk> wrote in message
      news:LvRbc.1940 5$Id.5604@news-binary.blueyond er.co.uk...[color=blue]
      > 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 "lookupwiza rd" to
      > give me the choice! any help/guidence would b appreciated.
      >[/color]


      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_componentTyp es 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_m fgName
      references manufacturers(m fgName),
      componentType varchar(50) not null
      constraint FK_components_c omponentType
      references componentTypes( componentType),
      componentDescri ption varchar(255) null,
      mfgPartNbr varchar(255) null,
      listPrice money
      )



































      Comment

      • SB

        #4
        Re: Help needed.

        John Winterbottom wrote:
        [color=blue]
        > "SB" <emailsam@bluey onder.co.uk> wrote in message
        > news:LvRbc.1940 5$Id.5604@news-binary.blueyond er.co.uk...
        >[color=green]
        >>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 "lookupwiza rd" to
        >>give me the choice! any help/guidence would b appreciated.
        >>[/color]
        >
        >
        >
        > 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_componentTyp es 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_m fgName
        > references manufacturers(m fgName),
        > componentType varchar(50) not null
        > constraint FK_components_c omponentType
        > references componentTypes( componentType),
        > componentDescri ption varchar(255) null,
        > mfgPartNbr varchar(255) null,
        > listPrice money
        > )
        >
        >
        >
        >
        >
        >
        >
        >
        >
        >
        >
        >
        >
        > thanks very much for feedback guys,
        >
        >
        >
        >
        >
        >
        >
        >
        >
        >
        >
        >
        >
        >[/color]

        Comment

        • James Fortune

          #5
          Re: Help needed.

          SB <emailsam@bluey onder.co.uk> wrote in message news:<LvRbc.194 05$Id.5604@news-binary.blueyond er.co.uk>...[color=blue]
          > 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 "lookupwiza rd" 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.[/color]

          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

          Comment

          • SB

            #6
            Re: Help needed.

            James Fortune wrote:[color=blue]
            > SB <emailsam@bluey onder.co.uk> wrote in message news:<LvRbc.194 05$Id.5604@news-binary.blueyond er.co.uk>...
            >[color=green]
            >>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 "lookupwiza rd" 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.[/color]
            >
            >
            > 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[/color]


            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!

            Comment

            • SB

              #7
              Re: Help needed.

              James Fortune wrote:[color=blue]
              > SB <emailsam@bluey onder.co.uk> wrote in message news:<LvRbc.194 05$Id.5604@news-binary.blueyond er.co.uk>...
              >[color=green]
              >>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 "lookupwiza rd" 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.[/color]
              >
              >
              > 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[/color]


              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!!!!!!!

              Comment

              • Steve Cummings

                #8
                Re: Help needed.

                SB <emailsam@bluey onder.co.uk> wrote in message news:<OPhcc.253 51$Id.20595@new s-binary.blueyond er.co.uk>...[color=blue]
                > James Fortune wrote:[color=green]
                > > SB <emailsam@bluey onder.co.uk> wrote in message news:<LvRbc.194 05$Id.5604@news-binary.blueyond er.co.uk>...
                > >[color=darkred]
                > >>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 "lookupwiza rd" 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.[/color]
                > >
                > >
                > > 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[/color]
                >
                >
                > 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!!!!!!![/color]

                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

                Comment

                • James Fortune

                  #9
                  Re: Help needed.

                  SB <emailsam@bluey onder.co.uk> wrote in message news:<OPhcc.253 51$Id.20595@new s-binary.blueyond er.co.uk>...[color=blue]
                  > James Fortune wrote:[/color]
                  [color=blue][color=green][color=darkred]
                  > >>im also aware that access might not be the best solution for this, again
                  > >>any help would b great.[/color]
                  > >
                  > >
                  > > 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[/color]
                  >
                  >
                  > 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!!!!!!![/color]

                  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

                  Comment

                  Working...