Results 1 to 5 of 5

Thread: Resolved Displaying a name instead of a number

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2002
    Location
    Tampa
    Posts
    10

    Unhappy 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.

  2. #2
    PowerPoster
    Join Date
    Aug 2000
    Location
    IN SILENCE
    Posts
    6,441

    Well

    VB Code:
    1. Select EMPLOYEE From Table Where CLIENT = ' & VARIABLEHOLDINGCLIENTNAME HERE & "'"
    Remaining quiet down here !!!

    BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....

  3. #3

    Thread Starter
    New Member
    Join Date
    Sep 2002
    Location
    Tampa
    Posts
    10
    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.

  4. #4
    PowerPoster Beacon's Avatar
    Join Date
    Jan 2001
    Location
    Pub Floor
    Posts
    3,188
    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?

  5. #5
    PowerPoster
    Join Date
    Aug 2000
    Location
    IN SILENCE
    Posts
    6,441

    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
  •  



Click Here to Expand Forum to Full Width