Avatar of PeterBaileyUk
PeterBaileyUk
 asked on

variance in access filter

I am in vba and I am trying to get access to filter 5 either side of the cc so if subform value is 2400 the filter will allow 2395 to 2405

I thought this would do it

Me.QryNonSMMTData_subform.Form.Filter = "CC= >=Me.CC.Value - 5 and <= Me.CC.Value + 5"
VBAMicrosoft Access

Avatar of undefined
Last Comment
PeterBaileyUk

8/22/2022 - Mon
Rgonzo1971

Hi,

pls try

Me.QryNonSMMTData_subform.Form.Filter = "CC >=Me.CC.Value - 5 and CC <=Me.CC.Value + 5" 

Open in new window

Regards
ASKER CERTIFIED SOLUTION
Dale Fye

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
PeterBaileyUk

ASKER
thank you
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy