Attachment Fields in Subforms not Showing in Main Form (1 Viewer)

reenieh

New member
Joined
May 29, 2019
Messages
7
I am having a program with my attachments subform not showing fields in the mainform I have created.

My mainform is developed from a query that bridges "ProjectNumbers" to "ContractID". Each subform is created from a query that does the same as the main form. I have a search query field where Project number can be selected and I now have that working and syncronized.

My problem is with the attachments subform. When I go into the single subform and design it for datasheet viewing (as one project number may return several contacts, thus several rows of attachments), I can see it clearly. However, when I open the main form, the ProjectNumber and ContractID show, but the fields where the attachment should show, there is nothing.

Also when I view as a single or continuous form, there is nothing for attachments either. Not in the subform itself or when it shows up on the mainform.

Database is currently under 2gig, so it is not the file size. Although I will move to detaching the file and using a url.

I cannot upload the database due to proprietary information, but have attached some screenshots and can answer all questions.
 

Attachments

theDBguy

I’m here to help
Joined
Oct 29, 2018
Messages
7,705
Hi. Welcome to the forum. Can you creat a small copy of your database with dummy data and post it instead of the real one? You don’t have to duplicate everything. Just enough to show the problem.
 

reenieh

New member
Joined
May 29, 2019
Messages
7
Sorry let me try again. file pretty big
 

reenieh

New member
Joined
May 29, 2019
Messages
7
I have pulled everything out but what is need and got rid of all attachments and replaced with some small png files. I compacted 3 times but cannot get it smaller than a 234K file and it will not upload.
 

Micron

AWF VIP
Joined
Oct 20, 2018
Messages
1,757
I compacted 3 times but cannot get it smaller than a 234K file and it will not upload.
Probably not due to the file size as I think db limit is 2 Mb. Maybe check FAQ's on how to upload?
 

Gasman

Enthusiastic Amateur
Joined
Sep 21, 2011
Messages
5,017
I have pulled everything out but what is need and got rid of all attachments and replaced with some small png files. I compacted 3 times but cannot get it smaller than a 234K file and it will not upload.
You need 10 posts to upload non zip files. Zip the file and upload that.
 

June7

AWF VIP
Joined
Mar 9, 2014
Messages
2,687
Why do you have table name with "PDF" when files are PNG type?

PDF file cannot display in Image control. Must be other image types - png, jpg, bmp, wmf. A WebBrowser control can display PDF file type.

Images won't display in form set to Datasheet view, use Single or Continuous.

Weirdness now. I get the images displaying when subform opened solo but when on main form they don't show.
 
Last edited:

reenieh

New member
Joined
May 29, 2019
Messages
7
The file is named pdf because it contains pdf attachments. I pulled them all out and put some random png files in it as it was proprietary.

Please read my initial post as it explains that I have tried the datasheet vs single and continuous. Please look at the attachments in my explanation and you will see what i mean.

I done this many different ways and no, dragging does not change anything. The results of which are shown in my attachments in my initial post
 

June7

AWF VIP
Joined
Mar 9, 2014
Messages
2,687
As I said PDF files cannot display in Image control. Even if form/subform issue resolved, PDF will not display. Just shows a PDF icon. Is that all you want?

The images subform is not editable. Is that what you want?
 
Last edited:

reenieh

New member
Joined
May 29, 2019
Messages
7
I do have them displaying in other versions of this database. See attached. I seem to get into problems when I have a working Search Field attached to the data. That is the only time it is not working for me.
 

Attachments

June7

AWF VIP
Joined
Mar 9, 2014
Messages
2,687
I built a new subform for the images. Bound directly to table. Then each Image control ControlSource becomes [Current Documents], etc. Built a new main form bound directly to Contracts and put subform on that. Images all show.

So I fixed your subform with:

1. remove MASTER PROJECT LIST from MASTER QUERY for PDF

2. set MASTER QUERY for PDF subform RecordSource to MASTER QUERY for PDF - not the SQL statement

3. change the ControlSource property of each Image control

4. textbox ControlSource to ONA Project Number

Pictures are now showing in your subform when on main form and records are editable.

Usually a form does data entry/edit for only 1 table. Conventional arrangement for many-to-many relationship is junction table as subform on a main form bound to table on 1 side and combobox in subform to select value from other side.

I think really should have the images subform link to contracts, not projects. So review this tutorial https://www.fmsinc.com/MicrosoftAccess/Forms/Synchronize/LinkedSubforms.asp

Advise not to use spaces in naming convention.
 
Last edited:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom