Results 1 to 3 of 3
  1. #1
    www is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2018
    Posts
    17

    DLookUp Qury Text Vaule from CBO

    Hello,



    I have a Combo box that the criteria is from a query (different mailing dates). When the user selects a date from the combo box, multiple text boxes display data from that dates mailing. What I am trying to get is another text box to display the staff that did the mailing on that date.

    I have a query (q_Directive_track_RL_cbo) with the following columns:
    Mail_Date Type Staff
    9/18/2017 Enrollment WO

    When the combo box is set to 9/18/2017 for example, I want a text box to display "WO"

    my current code =DLookUp("Staff","q_Directive_track_RL_cbo"), but now I am stuck.

    Thanks.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    you don't need a Dlookup...everything is in the combo box.
    have the combo show 3 columns,
    when the user picks the date, fill in the text boxes from the combo
    (NOTE: in vb, columns begin with zero ,not 1)

    Code:
    sub cboBox_afterupdate()
       txtType = cboBox.column(1)
    
    txtStaff = cboBox.column(2)
    end sub

  3. #3
    www is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2018
    Posts
    17
    Thank you.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. DLookUp text box
    By oakhoplite in forum Forms
    Replies: 2
    Last Post: 05-01-2018, 08:11 PM
  2. Replies: 1
    Last Post: 12-15-2017, 12:46 PM
  3. Data gets jumbled on append qury..
    By willmafingerdo in forum Queries
    Replies: 6
    Last Post: 03-08-2016, 01:05 PM
  4. Replies: 9
    Last Post: 04-18-2014, 08:51 PM
  5. Replies: 6
    Last Post: 07-13-2011, 02:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums