Subform query filter do nothing if not exact match

papasmurfuo9

Registered User.
Local time
Today, 11:41
Joined
May 28, 2014
Messages
69
Hi

i have a form that user completes

there are certain txt boxes that once filled out, will filter a subform of a table of 1000's of records to give them a number to use on the form

around 200 of the records have a depot in the "depot" field on the table, when they input a depot, it filters to them 200 fine if a depot is there,

what i want is, when they input the depot, if its there, filter it, if its not, to do nothing, as they could still get a unique number if the depot isnt in the list

what happens now is, if the depot isnt in the list, it displays no records

hope this makes sense

Field : Fld_Depot
Table : Tbl_Agreement_Summary
Show : False
Criteria : Like "*" & SearchForText([Forms]![Frm_New_Accounts]![Fld_Depot]) & "*"
Or : Is Null

thanks alot
 
if the above doesnt make any sense
basically

my sub form has 5 seperate filters,
one of them, if the end result is false (as in nothing to return, not null)
then for that one to be ignored
 
try using the after update event of the depot text box to trigger what you're trying to do.
After the text box has been updated, do a Dlookup to see if the depot exists, if it does, set your criteria and filter the subform, if the depot doesn't exist, do nothing
 

Users who are viewing this thread

Back
Top Bottom