Code Not Changing Report (1 Viewer)

dubiousp

Member
Local time
Today, 09:27
Joined
Mar 6, 2020
Messages
86
I have moved on amzingly thanks to the support and help from people in this forum, Im struggling with code behind my form. The idea is that data is entered through the basic form, then when form is clicked you can select the name for the report record. For some reason ven though I can select the name the report values do not change

Any help appreciated
 

Attachments

  • aCDM1R211bTAB33111.accdb
    3.3 MB · Views: 90

pbaldy

Wino Moderator
Staff member
Local time
Today, 01:27
Joined
Aug 30, 2003
Messages
36,131
Which report? Which form? How does someone unfamiliar with your app recreate the problem?
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 04:27
Joined
Feb 19, 2002
Messages
43,196
When you open a report/form from a form and you expect to see the changed data, you need to save the record BEFORE you open the report/form.

Use
DoCmd.RunCommand acCmdSaveRecord
or
Me.Dirty = False 'force current record to save
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 16:27
Joined
May 7, 2009
Messages
19,226
i already create a paramatered form for your report (A4CDM).
 

Attachments

  • aCDM1R211bTAB33111 (1).zip
    442.8 KB · Views: 85

dubiousp

Member
Local time
Today, 09:27
Joined
Mar 6, 2020
Messages
86
@arnelgp could you point me on how to sync other sub rports to that record, do I need to point the ID of subform to main form
 

dubiousp

Member
Local time
Today, 09:27
Joined
Mar 6, 2020
Messages
86
The main form for data entry is Basic then the report for selection is A4CDM..

I have fiddled with Parent and Child fields but fail to get the correct data to load per paerson
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 04:27
Joined
Feb 19, 2002
Messages
43,196
You sync subforms/reports with main forms/reports by using the Master/Child links. Click the control that holds the subform/subreport and open the properties dialog.
 

dubiousp

Member
Local time
Today, 09:27
Joined
Mar 6, 2020
Messages
86
Thanks Pat thats wha I thought but seems not to work as I thought following MS guide... I was basing my thoughts around the foreign key linked to main report ID
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 16:27
Joined
May 7, 2009
Messages
19,226
review the Record source of each subform.
instead of using Inner Join, use Left Join.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 04:27
Joined
Feb 19, 2002
Messages
43,196
Are you getting errors? Have you included the correct fields in the queries?

Try closing everything and compacting the database.
 

Users who are viewing this thread

Top Bottom