Arkadaşlar ekteki programda 
Dlookup  ile yaptığım sorguda ikili kriter kullanıyorum. Çalıştırdığımda tip uyuşmazlığı hatası veriyor.
Fakat kodlarını değiştirmeden tek olarak yazdığımda geçerli oluyor , ne zamanki araya "and" koyuyorum. O zaman hata veriyor.
Bir türlü çözemedim. 
Saygılar.
 
kullandığınız cümleyi hatalı şekli ile ekler misiniz
2007 vak' ası 
 
Buyrun hocam 
varmi = Nz(DLookup("alttur_id", "T_ALTTUR", "genturno=" & [genturkutu] And "alttur = '" & [falttur] & "'"), 0)
 
veri türüne göre kod konusunda
ekteki nota bir göz at ve sakla 
For numerical values:
        
Dlookup ("FieldName" , "TableName" , "Criteria = n")
For strings: (note the apostrophe before and after the value)
        
Dlookup ("FieldName" , "TableName" , "Criteria= 'string'")
For dates:
        
Dlookup ("FieldName" , "TableName" , "Criteria= #date#")
 
Refering to a form control
For numerical values:
        
Dlookup ("FieldName", "TableName", "Criteria = " & forms!FormName!ControlName)
For strings: (note the apostrophe before and after the value)
        
Dlookup ("FieldName", "TableName", "Criteria = '" & forms!FormName!ControlName & "'")
dates:
        
Dlookup ("FieldName", "TableName", "Criteria = #" & forms!FormName!ControlName & "#")
 
Mix-n-Match
   
Dlookup ("FieldName", "TableName", "Criteria1 = " & Forms!FormName!Control1  _
             & " AND Criteria2 = '" & Forms!FormName!Control2 & "'" _
            & " AND Criteria3 =#" & Forms!FormName!Control3 & "#")
Kolay gelsin
 
Oktay Hocam;
Bu hata veren kod;
varmi = Nz(DLookup("alttur_id", "T_ALTTUR", "genturno=" & [genturkutu] And "alttur = '" & [falttur] & "'"), 0)
Bu ise hata vermiyor;
varmi = Nz(DLookup("alttur_id", "T_ALTTUR", "genturno=" & [genturkutu] ), 0)
Bu da vermiyor;
varmi = Nz(DLookup("alttur_id", "T_ALTTUR", "alttur = '" & [falttur] & "'"), 0)
Aralarında ki yazım farkı sadece "and" ifadesi.
 
and öncesi ile sonrasındaki kriterleri yer değiştirerek denermisiniz. Ne alaka demeyin zaman zaman bu önem arz ediyor.