G
Guest
Wow, was looking back through the post and found where you had replied. I
probebly shouldn't havn't started a new thread but was thinking I have never
seen a post simular to this one. I even checked Monster Access and couldn't
find anything simular.
If you can figure it out, This code should probebly be posted on your web
site. I can see where this code could be very useful for an appointment,
memo, schedule type database. I Nixed the first database but kept the second
one as explained below.
If CDate(.ItemData(lRow)) >= Date() Then
..Value = .ItemData(lRow) 'This is where I was getting the error in both
databases
'Original code given
Private Sub Form_Load()
Dim lRow As Long
With Me.lstMyListBox ' ** substitute name
For lRow = Abs(.ColumnHeads) To (.ListCount - 1)
If CDate(.ItemData(lRow)) >= Date() Then
.Value = .ItemData(lRow)
Call lstMyListBox_AfterUpdate ' ** substitute name
Exit For
End If
Next lRow
End With
Here is my SQL Statement:
SELECT QScoresDate.Day, QScoresDate.[Date of Game]
FROM QScoresDate
ORDER BY QScoresDate.[Date of Game];
I Even Changed the listbox properties to only use one select statement and
reflect the full date.
Sql Statement of the second Listbox which the first listbox filtered.
SELECT QGameScheduleAll.gameId, QGameScheduleAll.[Date of Game],
QGameScheduleAll.[Ranking Home Team], QGameScheduleAll.[Home Team Name],
QGameScheduleAll.[Home team Score], QGameScheduleAll.[Visiting Team Ranking],
QGameScheduleAll.[Visiting Team Name], QGameScheduleAll.[Visiting Team Score]
FROM QGameScheduleAll
WHERE (((QGameScheduleAll.[Date of Game])=[forms]![ScoreBoardMenu]![List65]))
ORDER BY IsNull([Visiting Team Ranking]) DESC , QGameScheduleAll.[Visiting
Team Ranking], IsNull([ranking home team]) DESC , QGameScheduleAll.[Ranking
Home Team], QGameScheduleAll.[Visiting Team Ranking];
So I actually tried it in two databases.
The bound colum in both databases were 0. The difference in this example is
the first column 0 is a date with its properties set to dddd the second
column 1 set to short date. However I just tried it with 1 column then
setting it to long date.
Thanks, Mr. Goldarg
probebly shouldn't havn't started a new thread but was thinking I have never
seen a post simular to this one. I even checked Monster Access and couldn't
find anything simular.
If you can figure it out, This code should probebly be posted on your web
site. I can see where this code could be very useful for an appointment,
memo, schedule type database. I Nixed the first database but kept the second
one as explained below.
If CDate(.ItemData(lRow)) >= Date() Then
..Value = .ItemData(lRow) 'This is where I was getting the error in both
databases
'Original code given
Private Sub Form_Load()
Dim lRow As Long
With Me.lstMyListBox ' ** substitute name
For lRow = Abs(.ColumnHeads) To (.ListCount - 1)
If CDate(.ItemData(lRow)) >= Date() Then
.Value = .ItemData(lRow)
Call lstMyListBox_AfterUpdate ' ** substitute name
Exit For
End If
Next lRow
End With
Here is my SQL Statement:
SELECT QScoresDate.Day, QScoresDate.[Date of Game]
FROM QScoresDate
ORDER BY QScoresDate.[Date of Game];
I Even Changed the listbox properties to only use one select statement and
reflect the full date.
Sql Statement of the second Listbox which the first listbox filtered.
SELECT QGameScheduleAll.gameId, QGameScheduleAll.[Date of Game],
QGameScheduleAll.[Ranking Home Team], QGameScheduleAll.[Home Team Name],
QGameScheduleAll.[Home team Score], QGameScheduleAll.[Visiting Team Ranking],
QGameScheduleAll.[Visiting Team Name], QGameScheduleAll.[Visiting Team Score]
FROM QGameScheduleAll
WHERE (((QGameScheduleAll.[Date of Game])=[forms]![ScoreBoardMenu]![List65]))
ORDER BY IsNull([Visiting Team Ranking]) DESC , QGameScheduleAll.[Visiting
Team Ranking], IsNull([ranking home team]) DESC , QGameScheduleAll.[Ranking
Home Team], QGameScheduleAll.[Visiting Team Ranking];
So I actually tried it in two databases.
The bound colum in both databases were 0. The difference in this example is
the first column 0 is a date with its properties set to dddd the second
column 1 set to short date. However I just tried it with 1 column then
setting it to long date.
Thanks, Mr. Goldarg