ms access 2007 - data type mismatch on criteria expression -


i have 3 tables exact same data fields , data types. trying create search form using 1 combo box 3 subforms. tried changing string integer end same error: "data type mismatch on criteria expression". doing wrong here.

private sub cboalarmsearch_afterupdate()     dim spotalarm string     dim progressalarm string     dim finalalarm string     dim stralarmcriteria string      if isnull(me.cboalarmsearch) or me.cboalarmsearch = ""         msgbox "please choose alarm search.", vbokonly, "alarm required"      else         stralarmcriteria = me.cboalarmsearch.value          'alarm search spot         spotalarm = "select * tblspot ([alarm]  = '" & stralarmcriteria & "')"         me.frmspotsearchsubform.form.recordsource = spotalarm         me.frmspotsearchsubform.form.requery          'alarm search progress         progressalarm = "select * tblprogress ([alarm]  = '" & stralarmcriteria & "')"         me.frmprogresssearchsubform.form.recordsource = progressalarm         me.frmprogresssearchsubform.form.requery          'alarm search final         finalalarm = "select * tblfinal ([alarm]  = '" & stralarmcriteria & "')"         me.frmfinalsearchsubform.form.recordsource = finalalarm         me.frmfinalsearchsubform.form.requery     end if end sub 


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -