Queries VS Filters in Form with subforms

DemonDNF

Registered User.
Local time
Today, 06:01
Joined
Jan 31, 2014
Messages
76
What's the proper way of tackling this?

Main form - RecordSource=PART tbl - single layout

Inventory form - RecordSource=PART tbl - linked to Main form via Part key - single layout

Inventory Detail form - RecordSource=INVENTORY tbl - linked to Inventory form via Part Key - continous layout


General mode: no filters, can scroll through all parts and details using NAV buttons, this works fine.

Scan mode: filters set, the proper Part is brought up, but the continuous form still shows multiple Inventory Details for that Part. I want it to show only the one in Inventory Detail Filter.

Am I supposed to use RecordSource=Tables with Filters to do this, or RecordSource=Query?

(or is this a case of being able to do the same thing 2 ways, and I haven't figured how to use filters properly)

Robert
 
Solution: Replace idiot behind keyboard with a monkey, it'll code faster.


I was setting the Filter properly, and then clearing it waaaay at the bottom. D'oh...

Robert
 
Might as well post this too 'cause I'll forget, and it might help someone.

To turn on a filter:
Code:
Me.Form.Filter = "[Key] = " & lngFilterPartID
Me.Form.FilterOn = True

The part I couldn't find, how to turn off a filter:
Code:
Form_Main.FilterOn = False
Form_Main.Filter = ""

FilterOn must be set off before clearing Filter or else the form is not refreshed. Maybe there's another way, but this finally updated my form when I removed filter with a button-on-click.

Robert
 

Users who are viewing this thread

Back
Top Bottom