|
-
Oct 5th, 2002, 08:25 PM
#1
Thread Starter
New Member
Resolved Displaying a name instead of a number
I am building an application that shows (for one thing) what employee is assigned to what client.
I am using - ahem - UNBOUND controls throughout.
What I need to know is how can I get my client form to show
the employee name instead of the employee number
I'm using an Access database.
Thank you VB Gurus!!!
Last edited by subraven; Nov 2nd, 2002 at 05:52 PM.
To be on the wire is life - everything else is just waiting.
-
Oct 5th, 2002, 11:00 PM
#2
PowerPoster
Well
VB Code:
Select EMPLOYEE From Table Where CLIENT = ' & VARIABLEHOLDINGCLIENTNAME HERE & "'"
Remaining quiet down here !!!
BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....
-
Oct 6th, 2002, 08:31 PM
#3
Thread Starter
New Member
I guess I did not express myself clearly.
See code below:
With rsEmployee
lblLastName.Caption = ![lastname]
lblFirstName.Caption = ![firstname]
lblAddress.Caption = ![address]
lblCity.Caption = ![city]
lblState.Caption = ![region]
lblZip.Caption = ![postalcode]
lblPhone.Caption = ![homephone]
lblExt.Caption = ![Extension]
lblTitle.Caption = ![Title]
lblReports.Caption = ![reportsto]
lblHireDate.Caption = ![Hiredate]
lblRate.Caption = ![billablehours]
End With
The field
lblreports.caption = ![reportsto]
is showing the employee number instead of the employee name.
In the Access database - the employee is assigned by their number.
What I need is the code to display the First and Last names instead of their employee number.
Thanks again.
To be on the wire is life - everything else is just waiting.
-
Oct 6th, 2002, 08:39 PM
#4
PowerPoster
Originally posted by subraven
I guess I did not express myself clearly.
See code below:
With rsEmployee
lblLastName.Caption = ![lastname]
lblFirstName.Caption = ![firstname]
lblAddress.Caption = ![address]
lblCity.Caption = ![city]
lblState.Caption = ![region]
lblZip.Caption = ![postalcode]
lblPhone.Caption = ![homephone]
lblExt.Caption = ![Extension]
lblTitle.Caption = ![Title]
lblReports.Caption = ![reportsto]
lblHireDate.Caption = ![Hiredate]
lblRate.Caption = ![billablehours]
End With
The field
lblreports.caption = ![reportsto]
is showing the employee number instead of the employee name.
In the Access database - the employee is assigned by their number.
What I need is the code to display the First and Last names instead of their employee number.
Thanks again.
This reportsto field is apart of a relationship with another table yes?
Or you used the lookup wizard yes?
-
Oct 6th, 2002, 08:40 PM
#5
PowerPoster
Well
Select lastname, Firstname From Table Where reportsto = ' & EmployeeNoVariabletoPass & "'"
Remaining quiet down here !!!
BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|