access can't find the field '|' referred to in expression -
i encountered error 'microsoft office access can't find field '|' referred in expression" when using dcount function count number of orderno occurence in table. datatype orderno number. here's i've done
if dcount("[orderno]", "tbldisposition", "[orderno]='" & [txtorderno.value] & "'") > 1 msgbox "duplicate data", vbokonly, "error" else msgbox "succeed" end if
on form's load event set txtorderno control source orderno in tbldisposition. try use dlookup function , seems same errors.
the expression [txtorderno.value]
looks wrong. try without square brackets, e.g:
if dcount("[orderno]", "tbldisposition", "[orderno]=" & txtorderno.value) > 1 msgbox "duplicate data", vbokonly, "error" else msgbox "succeed" end if
Comments
Post a Comment