By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,608 Members | 1,700 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,608 IT Pros & Developers. It's quick & easy.

Parsing Employee Name field

P: 11
My table contains single field for EmployeeName populated as LASTNAME, FIRSTNAME
In my report query qry_OptimizeIt1 I defined two new fields as Expr4: ParseFirstComp([OrderRepName]) and Expr2: ParseSecondComp([OrderRepName])
In my report, for text box RepName, my Control Source is =StrConv([Expr2] & " " & [Expr4],3) which changes the name to FirstName LastName,
My problem is that I end up with a comma after the LastName.
Can someone help me determine how to eliminate the comma?


Krazy (Bill) Kasper
Sep 15 '08 #1
Share this Question
Share on Google+
2 Replies

Expert 2.5K+
P: 3,532
You need to modify the function that parses out your last name; it apparently adds a comma after the name is parsed. Just remove the code, which will probably be

& ","

It would be much easier to follow ypor code if you replaced [Expr2] and [Expr4] with more intuitive names like LName and FName.

Linq ;0)>
Sep 15 '08 #2

Expert Mod 15k+
P: 31,754
This certainly appears to be a problem with your ParseFirstComp() function. As the comma already exists in the original data I suspect it is simply not being excluded. Your code would help here. A relevant part of the question.

Anyway, look in that function and change the length value you use in you Mid() line (I would guess) to one less.
Sep 16 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.