PDA

Click to See Complete Forum and Search --> : Calendar Coded List Box


Arrets
Feb 9th, 2004, 01:00 PM
Hi:

I have an Access Database in which I created a form. The form has a calendar (which shows three months at a time), a date bar (which showed the date(s) picked), and a list box (which shows the date, customer name, city, maintenance date).

All the sync codes I've entered work fine if you just pick a single date. In the list box it will show all the customers on that specific date and their information. I do have the calendar set up for MultiSelect dates. And when I select more than one date it does highlight those dates and shows up in the date bar. The problem is that the customers in the list box only show the first date.

How do I set this up so that I can show all the customers in all the dates selected? Here is my code.

Private Sub SyncControls()
Dim SQLText
SQLText = _
"SELECT [C qry PM Dates].[Dates],[C qry PM Dates].[Customer Name],[C qry PM Dates].[City],[C qry PM Dates].[DATE DONE] " _
& "FROM [C qry PM Dates]" _
& "WHERE ((([C qry PM Dates].[Dates]) = #" _
& Me![MonthView7] & "#)) " _
& "ORDER BY [C qry PM Dates].[Dates];"
With Me![CtrlList]

.RowSource = SQLText

.Requery
End With


End Sub

I hope that someone can help because I don't know what I'm doing wrong. I'm still very new at coding and am trying to learn as fast as possible.

Thanks in advance for your input.

Arrets:wave: