開くフォームを F001 絞り込む条件が入力されているフォームを F002 とします
F001のフィールド フィールド名1 フィールド名2
F002のフィールド フィールド名A
特定のフィールドがNULL以外で絞り込み
stDocName = "F001 "
stLinkCriteria = "[フィールド名1] is not null"
DoCmd.OpenForm stDocName, acNormal, , stLinkCriteria
複数の条件で絞り込み
stDocName = "F001"
stLinkCriteria = "[フィールド名1]= forms!F002!フィールド名A and [フィールド名2]='条件'"
DoCmd.OpenForm stDocName, acNorma, , stLinkCriteria
絞り込み解除
Forms.フォーム名.FilterOn = False
目次へ
F001のフィールド フィールド名1 フィールド名2
F002のフィールド フィールド名A
特定のフィールドがNULL以外で絞り込み
stDocName = "F001 "
stLinkCriteria = "[フィールド名1] is not null"
DoCmd.OpenForm stDocName, acNormal, , stLinkCriteria
複数の条件で絞り込み
stDocName = "F001"
stLinkCriteria = "[フィールド名1]= forms!F002!フィールド名A and [フィールド名2]='条件'"
DoCmd.OpenForm stDocName, acNorma, , stLinkCriteria
絞り込み解除
Forms.フォーム名.FilterOn = False
目次へ