Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Concatenation problem 3

Moss100

Technical User
Aug 10, 2004
584
GB
Hello,

I have added to the end of this concatenation, but can not get it working. I think I have an error after the last AND statement - can anyone help? Thank you Mark

Code:
Me.Filter = "[Inv_Invoice_Dated] BETWEEN #" & DatStart & "# AND #" & DatEnd & "# AND [Number_Value]<> true AND [Inv_Pman_Lan_ID_WorkAt_Link] = cbo_Landlord_Select"
 
OzFoxy’s reply is probably spot on unless the last field is numeric. The code would be:
AND [Inv_Pman_Lan_ID_WorkAt_Link] = " & Me.cbo_Landlord_Select
 
Something like

Rich (BB code):
Me.Filter = "[Inv_Invoice_Dated] BETWEEN #" & DatStart & "# AND #" & DatEnd & "# AND [Number_Value]<> true AND [Inv_Pman_Lan_ID_WorkAt_Link] = " & cbo_Landlord_Select

depending on datatype of Inv_Pman_Lan_ID_WorkAt_Link

<fx: edit> Oops. Created this about 2 mins after the OP, and then forgot to actually post it. So it is pretty similar to other replies you already have
 
Try something like this:

strF = "Inv_Invoice_Dated BETWEEN #" & DatStart & "# AND #" & DatEnd & "# "
strF = strF & " AND Number_Value <> true "
strF = strF & " AND Inv_Pman_Lan_ID_WorkAt_Link = " & cbo_Landlord_Select

Debug.Print strF

Me.Filter = strF
 
Thank you all very much for your help - spot on 👍
 

Part and Inventory Search

Sponsor

Back
Top