Welcome to SPN

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

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

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?
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page