Solved Filter subform with same criteria as main form (1 Viewer)

maabadi

New member
Local time
Today, 22:23
Joined
Aug 6, 2012
Messages
14
Hi. I have 3 tables (FieldT, WellT and WellFixingT). I related FieldT with WellT with FieldID and Then WellT With WellFixingT with WellID.
Then I created Forms based WellT and WellFixingT. When I Double-click on ID (WellID) at First Form, it open Second form (with Subform).
Problem is Mainform show Well Characteristics But Subform doesn't show. ( Mainform source is WellT, But Subform Source is WellFixingT)
I want to add Fixing Detail in Subform. What is Problem? (my form is persian)
WellForm.jpg
 

Attachments

  • FixingWells.zip
    600.5 KB · Views: 73

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 01:53
Joined
May 7, 2009
Messages
19,245
i comment out the code on your Load/Current event.
You don't need to filter since, you already have a Master/Child Link Fields set.
 

Attachments

  • FixingWells.zip
    655.4 KB · Views: 61

maabadi

New member
Local time
Today, 22:23
Joined
Aug 6, 2012
Messages
14
i comment out the code on your Load/Current event.
You don't need to filter since, you already have a Master/Child Link Fields set.
Thanks @arnelgp , but still subform doesn't show WellID, Field Name and WellNo? Why?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 01:53
Joined
May 7, 2009
Messages
19,245
I don't think you need FieldName and WellNo field in your WellFixingT.
since they are already exists on table WellT and the FieldName in table FieldT.

i created a Query (see Record Source of the subform) to get the FieldName and WellNo field.
you need not save these 2 fields in WellFixingT.
 

Attachments

  • FixingWells.zip
    276.1 KB · Views: 63

maabadi

New member
Local time
Today, 22:23
Joined
Aug 6, 2012
Messages
14
Thanks and sorry for late replying. this problem solved with your recommendations.
But I have one more problem. if it is need to post as new thread tell me to do it.
When I want to print that form (With Bottom Button) ( I want to see information from WellT and WellfixingT on Report). I see this error:

ReportProblem22.jpg



ReportProblem.jpg
 

Attachments

  • ReportProblem.jpg
    ReportProblem.jpg
    150.4 KB · Views: 46
  • ReportProblem.jpg
    ReportProblem.jpg
    150.4 KB · Views: 41

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 01:53
Joined
May 7, 2009
Messages
19,245
you upload again your db and i will have a look.
It seems it is an error on the Query/Record source of the report.
 

maabadi

New member
Local time
Today, 22:23
Joined
Aug 6, 2012
Messages
14
This is my last modified DB
 

Attachments

  • FixingWells.accdb
    3.3 MB · Views: 58

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 01:53
Joined
May 7, 2009
Messages
19,245
you check the changes in FixWellQ query.
 

Attachments

  • FixingWells.accdb
    2.1 MB · Views: 69

maabadi

New member
Local time
Today, 22:23
Joined
Aug 6, 2012
Messages
14
Special Thanks mate. this is really what I want.
You really saved me.
 

Users who are viewing this thread

Top Bottom