Hey, I recently switched over to using SQL for the backend of my Access databases. The codes I have use to work, all I have just modified them a little to be able to use the SSRS easier.However since I made the changes I keep getting an error message stating:Quote:Object variable or With block not setMy code is basically the following

If Not IsNull(Me.dp1) Or Me.dp1 <> "" Then'If you are adding a new record, then this code will work, if you finding an existing record you will need a where clause and an edit instead of addnew Set db = CurrentDb Set sn = db.OpenRecordset("SELECT * FROM dbo_FIDataEntry ORDER BY ID DESC", dbOpenDynaset, dbSeeChanges)