sql - How to stop Access from thinking my table.field in VBA is a form component? -
so i'm writing sql query in vba in access 2010, , when code ran, thinks supplierconnect.mailboxid component on form, in fact database table (supplierconnect) , field (mailboxid). every time code ran pops box asking me input form component, isn't one. there way around or code differently?
thanks!
' mailbox id if isnull(mailboxidcombobox.value) else if firstwhere = true mailboxid = "where supplierconnect.mailboxid = '" & [forms]![supplierquery]!mailboxidcombobox.value & "'" firstwhere = false else mailboxid = " , supplierconnect.mailboxid = '" & [forms]![supplierquery]!mailboxidcombobox.value & "'" end if end if
this not popping asking value because thinks form control, because undefined query. cannot find field within query definition. happens because not have proper case sensitive table or field id or incorrect table linked. if provided more code sql statement using beginning end , exact table structure can narrow down mistake.
Comments
Post a Comment