Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Dec 2006
    Posts
    250
    Thanks
    0
    Thanked 0 Times in 0 Posts

    form field based on query (2003)

    Hello,

    I have a form coming from a table and a field in that form call "LastName" coming from a query. This query also has another field "Password" that I need to put in the form, but it will be based on the field "LastName". The first field is a combo box with the following properties:
    Control=LastName
    Query=qryLastName
    Column Count= 4 (1 is Last Name, 2 First Name, 3 Both, 4 Password).
    Column Width = 0";0";2";0"

    Second field is a text box and has the following properties
    Control = LastName.column (4)

    However, I don't see anything display when I put the second field on the form. I should automatically would like to see the password for the "LastName" that is selected. Any help would be great. Thanks.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: form field based on query (2003)

    The columns in a list box or combo box start counting at 0, i.e. Column(0) is the 1st column, Column(1) is the 2nd etc. So try

    =LastName.Column(3)

  3. #3
    3 Star Lounger
    Join Date
    Dec 2006
    Posts
    250
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: form field based on query (2003)

    Thank you for all your help Hans. That works.

Posting Permissions

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