|
-
Apr 24th, 2000, 05:01 AM
#1
Thread Starter
Addicted Member
I need to get the result of the following query into a label called lblTotalDatabaseReceived - I can't get it to seem to work. I can get an msflex grid to populate w/ the correct answer but not the label. What would the syntax be?
Private Sub Form_Load()
cboMonth = frmPendingPSR.cboMonth
cboYear = frmPendingPSR.cboYear
If cboMonth = "January" Then
cboMonth = "1/31"
End If
If cboMonth = "February" Then
cboMonth = "2/29"
End If
If cboMonth = "March" Then
cboMonth = "3/31"
End If
If cboMonth = "April" Then
cboMonth = "4/30"
End If
If cboMonth = "May" Then
cboMonth = "5/31"
End If
If cboMonth = "June" Then
cboMonth = "6/30"
End If
If cboMonth = "July" Then
cboMonth = "7/31"
End If
If cboMonth = "August" Then
cboMonth = "8/31"
End If
If cboMonth = "September" Then
cboMonth = "9/30"
End If
If cboMonth = "October" Then
cboMonth = "10/31"
End If
If cboMonth = "November" Then
cboMonth = "11/30"
End If
If cboMonth = "December" Then
cboMonth = "12/31"
End If
cboYear = Mid(cboYear, 3, 2) 'get 94 from 1994
strStartDate = Format("10/4/94", "mm/dd/yy")
strEndDate = Format(cboMonth & "/" & cboYear, "mm/dd/yy")
MsgBox strStartDate
MsgBox strEndDate
Data2.RecordSource = "Select COUNT (*) From Master WHERE DATE_OPENED BETWEEN #" & strStartDate & "# and #" & strEndDate & "#"
sql = Data2.RecordSource
frmRptTotals.Data2.RecordSource = sql
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|