Chuck J Posted November 27, 2005 Posted November 27, 2005 I need to combine a first_name field contents with a last_name field contents into a joined_name field. I have tried a few calculations with poor results, what am I forgetting?
Lee Smith Posted November 27, 2005 Posted November 27, 2005 H Chuck, For Something like John Doe first_name & " " & last_name For something like Doe, John last_name & ", " & first_name HTH Lee
Chuck J Posted November 27, 2005 Author Posted November 27, 2005 I must have had a brain freeze, minutes after I posted the problem, the solution came to me. I used: LeftWords( First_Name, 1) &" " & LeftWords( Last_Name, 1) Worked fine, I was creating a certificate and needed the names combined, now if I can figure out how to add the date in a date field to a number from a text field in a related database I can call it a day.
LaRetta Posted November 27, 2005 Posted November 27, 2005 Hi Chuck, LeftWords( First_Name, 1) &" " & LeftWords( Last_Name, 1) What else is in those two fields that you need to eliminate? If nothing, just use the fields themselves as First_Name & " " & Last_Name as Lee indicated. I hope you don't have any [color:blue]Van Damme's or such for last names because last name will become [color:blue]Van with your calc. Any Peggy Sue's for first name? She'll get upset if you call her Peggy, you realize! Do you have any with middle initial or MD or PhD, or any initials for first name? I would take a close look at your data. Names are a tricky business and this is why each PIECE of a name should be in a separate field - so ALL of the field can be used safely whenever you wish. But by pulling just a WORD from a name, you may not get what you want ... LaRetta :wink2:
LaRetta Posted November 27, 2005 Posted November 27, 2005 Well for goodness sakes! How rude of me! I didn't address your other question! "... how to add the date in a date field to a number from a text field in a related database..." Does the number field (type text) in your related table indicate number of days? And you want to add these days to a date field in your main table to produce a new 'date + __ days'? Or is the date 'today's date' or the number actually months, quarters, fiscal, what? If your related table is the 'many' side, only the number from the FIRST related record will be grabbed if in its natural sort state of creation order. So you may need to sort the relationship, use an aggregate calc or further isolate your relationship. If you fill us in, we can help you further. LaRetta
Recommended Posts
This topic is 6939 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now