Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Statement Problem in form

Status
Not open for further replies.

mdmarney

IS-IT--Management
Jan 16, 2003
68
US
The folowing code is erroring out. Any suggestions...

Private Sub Form_Current()

Set rs = CurrentDb.OpenRecordset("Select * from tbl_Attendants where Parish or Group ID = " & me!Parish or Group ID & ")

rs.MoveLast

Me.tx_Count_Box_2 = rs.RecordCount

End Sub *************
M. MARNEY
 
hi marney,

Try this

dim strSQL as string
strSQL = "Select * from tbl_Attendants where (Parish = " & me.Parish or [Group ID]=" & me.GroupID
Set rs = CurrentDb.OpenRecordset(strSQL)


Shyam
cwizshyam@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top