G
Guest
I'm trying to run this code to set a form's recordsource. I've tried this
code both in the open and load events. intTot is actually a number field
whose format is byte. Am I missing a quote somewhere or what's wrong?
Thanks for all help offered!
JR
Dim db As Database
Dim rst As Recordset
Set db = CurrentDb()
Set rst = db.OpenRecordset("select * from tblTaxIndicators where intTot
= " & _
1, dbOpenSnapshot)
If rst.RecordCount = 1 Then
Me.RecordSource = "qryDD"
Else
Me.RecordSource = "qryDDTot"
End If
Set db = Nothing
Set rst = Nothing
code both in the open and load events. intTot is actually a number field
whose format is byte. Am I missing a quote somewhere or what's wrong?
Thanks for all help offered!
JR
Dim db As Database
Dim rst As Recordset
Set db = CurrentDb()
Set rst = db.OpenRecordset("select * from tblTaxIndicators where intTot
= " & _
1, dbOpenSnapshot)
If rst.RecordCount = 1 Then
Me.RecordSource = "qryDD"
Else
Me.RecordSource = "qryDDTot"
End If
Set db = Nothing
Set rst = Nothing