Code: Debug.Print DCount("Pad_Number", "Wells_PAD_Name", "ID_Area & Pad_Number = " & Me.ID_Area & NewPadNumber) ' returned 1 ' this one works great
Code: Dim HospitalSiteID As String Dim PatientID As Integer Dim strCriteria As String strCriteria = "[HospitalSiteID] = '" & HospitalSiteID & "'" And "[PatientID] = " & PatientID rs.FindFirst strCriteria ...
DoCmd.OpenForm "Purchasing_PRC2_withoutInvoice_form", View:=acFormDS, wherecondition:="Transactions.PRC2DocID Is Null And DocRec.[Class Code]=100 and [Date of Record] between #" & Forms!MonthReportPreparation_OTPS.startdateparOTPS & "# and #" & EndOfMonth(Forms!MonthReportPreparation_OTPS.startdateparOTPS) & "#"I tried putting the first two items in the where condition (the 'Transactions.PRC2DocID Is Null And DocRec.[Class Code]=100' parts) into the sql query itself, and leaving only the date criteria in this vb line, but that doesn't work either. All the field names exist and are spelled correctly.
Would anyone be able to tell me why docmd.openform works with a single where criteria but asks for parameters input with multiple criteria?
Code: Docmd.OpenForm "LOG SHEET - ORDERS", acNormal, "", "[CustomerName]=" &" '" [&CustomerName] & "'", , acNormalbut can I expand this to another criteria? (no!).
Code: Dim db As Database Dim rs As Recordset Dim Criteria As String Set db = CurrentDb Set rs = db.OpenRecordset("tblCalendarEvents") Criteria = "[date_of]=#" & ctldate & "# AND [sbjID]='" & strSbjID & "' AND [choices]='" & strChoice & "'" rs.FindFirst CriteriaI'm getting the error 3251