Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Combining Intials and Date to make an ID

Discussion in 'Information Technology' started by Andy, Nov 4, 2005.

  1. Andy

    Andy
    Expand Collapse
    Guest

    I am running a query for a project database i am creating. The columns run as
    follows: Project Name, Project Manager, and Bid Date. This is what i what i
    started JobNo: Left([Project Manager],3)+left([Project Name],3)+Year([Bid
    Date]). Right now i am getting an error, what am i doing wrong?
     
  2. Ofer

    Ofer
    Expand Collapse
    Guest

    I think that this is what you are looking for

    Left([Project Manager],3) & left([Project Name],3) & Year([Bid
    Date])
    --
    If I answered your question, please mark it as an answer. That way, it will
    stay saved for a longer time, so other can benefit from it.

    Good luck



    "Andy" wrote:

    > I am running a query for a project database i am creating. The columns run as
    > follows: Project Name, Project Manager, and Bid Date. This is what i what i
    > started JobNo: Left([Project Manager],3)+left([Project Name],3)+Year([Bid
    > Date]). Right now i am getting an error, what am i doing wrong?
     
  3. WhyIsDoug

    WhyIsDoug
    Expand Collapse
    Guest

    There are a couple of possibilities but not know what the error is, or what
    version of Access you are using, I will take a stab with one of them.

    You are using the "+" Operator as a concatenation operator. This will work
    in VBA but Jet is attempting to add the fields together to come up with a
    sum. You need to use the correct cocatenation operator, which is the
    ampersand "&"

    Your calculated field should look like this:
    JobNo: Left([Project Manager],3) & Left([Project Name],3) & Year([BidDate])
    --
    WhyIsDoug?


    "Andy" wrote:

    > I am running a query for a project database i am creating. The columns run as
    > follows: Project Name, Project Manager, and Bid Date. This is what i what i
    > started JobNo: Left([Project Manager],3)+left([Project Name],3)+Year([Bid
    > Date]). Right now i am getting an error, what am i doing wrong?
     
  4. Andy

    Andy
    Expand Collapse
    Guest

    Thanks guys, that helped alot

    "Andy" wrote:

    > I am running a query for a project database i am creating. The columns run as
    > follows: Project Name, Project Manager, and Bid Date. This is what i what i
    > started JobNo: Left([Project Manager],3)+left([Project Name],3)+Year([Bid
    > Date]). Right now i am getting an error, what am i doing wrong?
     
  5. Ofer

    Ofer
    Expand Collapse
    Guest

    You welcome, have a good weekend
    --
    If I answered your question, please mark it as an answer. That way, it will
    stay saved for a longer time, so other can benefit from it.

    Good luck



    "Andy" wrote:

    > Thanks guys, that helped alot
    >
    > "Andy" wrote:
    >
    > > I am running a query for a project database i am creating. The columns run as
    > > follows: Project Name, Project Manager, and Bid Date. This is what i what i
    > > started JobNo: Left([Project Manager],3)+left([Project Name],3)+Year([Bid
    > > Date]). Right now i am getting an error, what am i doing wrong?
     

Share This Page