Results 1 to 2 of 2
  1. #1
    kawi6rr is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    39

    Populating list box with column heading?

    Just like to say thanks in advance for anybody who can help me.

    I have a listbox that I’m populating from a query string that’s based on two date fields beginning and ending dates. What I would like my list box to look like is this


    firstName | lastName | MI department | fppeDate
    John | Doe | D. | someDept | 1/1/10
    Jane | Doe | D. | anotherDept | 2/1/10



    Unfortunately what shows up is John and Jane with no heading and no other data requested in the query string.

    John
    Jane

    Here’s the code I’ve come up with so far but am fairly new to this.

    Dim Beginning As Date
    Dim Ending As Date

    Beginning = Me.txtBeginDate.Value
    Ending = Me.txtEndDate.Value

    If Not IsNull(Beginning) And Not IsNull(Ending) Then
    Me.OutPut.RowSource = "SELECT firstName, LastName, department, fppeID, fppeDate FROM FPPE WHERE fppeDate >= #" & Beginning & "# AND fppeDate <= #" & Ending & "# ORDER BY " & fppeDate
    'Me.OutPut.RowSource
    Else


    MsgBox "you need to enter a beginning and end date!"
    End If

    Does anyone have any ideas?

  2. #2
    kawi6rr is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    39
    Problem solved.
    Properties
    -format
    -columns = 5
    -column heads = yes

    Works like a charm

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

Similar Threads

  1. Please Help With Changing Heading
    By angelln in forum Access
    Replies: 3
    Last Post: 08-05-2010, 09:01 AM
  2. Replies: 7
    Last Post: 04-27-2010, 02:47 PM
  3. Replies: 1
    Last Post: 04-15-2010, 02:07 AM
  4. List box column check..
    By empyrean in forum Programming
    Replies: 1
    Last Post: 10-28-2009, 08:18 AM
  5. inserting values in column based another column
    By wasim_sono in forum Database Design
    Replies: 1
    Last Post: 06-27-2006, 05:23 AM

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