Solved Problem with Form and subform (1 Viewer)

maabadi

New member
Local time
Today, 08:04
Joined
Aug 6, 2012
Messages
14
Hi.
1. When I click on button at first form, it show inputbox that I should input on it (Step 4) . Why?
2. Then When I Press enter open second form Show filtered mainform but it doesn't show filtered subform. what is wrong with it? (Step 5)
3. I want to create report from subform when click button with all information on it. (Step 6)

Image1.png
Image2.jpg
 

Attachments

  • FixingWells4.accdb
    1.9 MB · Views: 72

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 23:34
Joined
Feb 19, 2002
Messages
43,293
1. If the prompt is unintended, it is caused because Access doesn't recognize a reference in a query and so it assumes you want to prompt for the value. Verify that all names in the query are actually present in the referenced table/query and are spelled correctly. This sounds familiar. Is this part of another of your threads?
2. Check the master/child links. The RecordSource for the subform should NOT include a join to the parent table. Also, if the subform does not allow additions and the parent record has no child records, the subform will be completely blank, without even labels.
3. Create the report. In the button on the subform, use the OpenReport method and use the where argument to filter the data.
 

Mike Krailo

Well-known member
Local time
Yesterday, 23:34
Joined
Mar 28, 2020
Messages
1,044
The master/child links are wrong in the subform. You have:
1693846821090.png


Should be:

1693846847727.png
 

maabadi

New member
Local time
Today, 08:04
Joined
Aug 6, 2012
Messages
14
Thanks @Pat Hartman and @Mike Krailo . I solved first part with your suggestions. but still subform doesn't show CenterID and Fields Name.
Please if it's possible check my file. thanks.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 11:34
Joined
May 7, 2009
Messages
19,245
you do not need WellNo and FieldName fields on WellFixingT table.
i make the the Textboxes on the subform Unbound.
i added timer to the main form to set the values of these textboxes on the subform.
you can't set them directly (ie: Forms!CenterandFixingF!Centerid) since the subform Loads first before the main form.
 

Attachments

  • FixingWells4.accdb
    1.8 MB · Views: 58

Users who are viewing this thread

Top Bottom