Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    601

    Unanswered: Bringing back good ol' times.

    I am still fiddling with what this thread was about. I am still stuck and very fusterated.

    The current code I am working with for the Record Source is:
    Code:
    SELECT [FirstName]+
    " "+[LastName] AS FullName, 
    Employees.EmployeeID, Buddy.EmployeeID, Buddy.Buddy_EmployeeID, 
    (Buddy.Buddy_EmployeeID=(Employees.EmployeeID=(Employees.FirstName+" "
    +Employees.LastName))) AS BuddyFullName
    FROM Employees
    INNER JOIN Buddy
    ON (Employees.EmployeeID=Buddy.EmployeeID)
    AND (Employees.EmployeeID=Buddy.Buddy_EmployeeID);
    The second half of my Inner join and my cast to BuddyFullName does not work, help

  2. #2
    Join Date
    Mar 2004
    Location
    www.scirocco.ca
    Posts
    346
    What do you want to do with this line of code?

    Code:
    (Buddy.Buddy_EmployeeID=(Employees.EmployeeID=(Employees.FirstName+" "+Employees.LastName))) AS BuddyFullName
    http://www.scirocco.ca/images/banner...occobanner.gif

    Download for FREE the ADO/DAO Data Controls that makes life EASIER developing database applications in: VB, FoxPro, Access, VC++, .NET etc... Navigate, Add New, Delete, Update, Search, Undo and Save your changes. Supports Disconnected Recordsets and Transactions!

    Or try our Ask An Expert service to answer any of your questions!

  3. #3
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    601
    That line looks at the employeeID field again. Then take that record and combine the first and last name again...or supposed to. I think I am not getting the second referral (buddy_employeeID in the Buddy table) of the employeeID working correctly.

    Any ideas? I almost just added employeeID1 but that would be pointless...
    Last edited by rguy84; 07-13-04 at 13:57.

  4. #4
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    are we talking Access or what?
    at least up to A2K the concatenation operator is "&" not "+"

    izy
    currently using SS 2008R2

  5. #5
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004

    Smile

    If you're simply trying to concatenate two fields then here is a visual of a field in my query:

    Code:
    SELECT tblEmployee2.EmployeeID, [eFName] & " " & [eLName] AS Name, tblEmployee2.ProjectMgr
    FROM tblEmployee2
    WHERE (((tblEmployee2.ProjectMgr)=0));
    Note the section in BOLD type, that is what pulls the First and Last name fields together to create the field for the FullName.

    Is this what you are after?

    Bud

  6. #6
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    601
    Yes, I got the first pull to work, but not the second. Like I said I think buddy.Buddy_EmployeeID doesn't understand that it should equal Employee.EmployeeID. Like Buddy.EmployeeID=Employees.EmployeeID

    {edit}Theres a line from Employees.EmployeeID that now splits to buddy.EmployeeID & buddy.Buddy_EmployeeID. Now when I have access accept that query, minus the that statement that was highlighted. The fields to select in the box, in the report is blank...
    Last edited by rguy84; 07-13-04 at 14:51.

  7. #7
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    601
    Thatsplit is only in the query. And now the main relationship window.

  8. #8
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    contact me on aim if you still need help with this, there's too much to cover through posts.

    Edit: Sup post #1200?
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  9. #9
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    601
    Teddy- will do or try to. Our time differences..
    1,200 w00t!

  10. #10
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004

    Red face

    Quote Originally Posted by rguy84
    Teddy- will do or try to. Our time differences..
    1,200 w00t!
    Hi again,
    One thing to make sure of is the DataType of both fields you are trying to contatenate from both tables. Why not make a copy of your data with real data removed, zip and post here so we can better help you out. This is getting a bit much.

    Bud

  11. #11
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    601
    Ok, Here it is.

  12. #12
    Join Date
    Dec 2003
    Posts
    268

    .mdb

    I couldn't even open the zipped file. Using A2k. What version are you running.

    Have you tried recreatign the query in the QBE with data you know will generate results then try and make substitutions for your variables in VBA?

  13. #13
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    601
    Using A02.
    Thats the prob I cant get what i want...

  14. #14
    Join Date
    Dec 2003
    Posts
    268

    Repost MDB

    Try reposting your MDB. I'll give it a shot.

  15. #15
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    601
    If it didnt work i uploaded last week.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •