473,320 Members | 2,112 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Microsoft Access 2000

5 Nibble
Hello, I've been given the task at work to create a database for everything single part that gets painted in the factory. The guys on the assembly line want pictures so they can easily understand how to hang and pack out different parts. Is there any way to insert pictures into each separate part page without storing the picture in the database and instead pulling the picture from a folder outside the database. I also do have code to look up each part number whether it be the painted or unpainted part number. Please let me know if anyone can help!

Thanks

(... from the second thread ...)
I'm working on a database for work that involves putting pictures into the database. But I'm trying to find a way to store them in the database without actually keeping the picture in the database to avoid a storage overload in the database. I have a search bar that will look up either the painted or unpainted picture but putting a picture in has been a struggle. Just a beginner using Microsoft Access 2000 and looking for help with as much detail as possible. Thanks!
Jul 20 '22 #1

✓ answered by zmbd

@bucher1 But the problem I'm running into is finding code to help put different pictures that will link with one part number.
Good Morning Bucher,
Now we have something to work with!
If you stick with this... you can do this... however, this is really not a novice project - so be patient with yourself (and with us :) ) we've all been there, and we'll help you get thru this!

📌You are not going to find a single VBA code solution that will show multiple images for a given part.

🏁 HOWEVER - comma...
the Concept of Normalization can help here: > Database Normalization and Table Structures.

So to give you idea as to how I might accomplish what it appears you are trying to do...

Using a very simple construct (I'm going to GREATLY simplify the normalization)
Table with your "Part information"
Expand|Select|Wrap|Line Numbers
  1. tbl_Parts
  2. [PK_Part] [PartID] [PartName] [PartDetail                  ]
  3. [1      ] [124A  ] [Example1] [Just an example part item one]
  4. [2      ] [567A  ] [Example2] [Just an example part item two] 
Table linking each part to a series of pictures
Expand|Select|Wrap|Line Numbers
  1. tbl_ImagesToParts
  2. [PK_Img2Prt] [FK_Part] [ImgName     ] [ImgDetail                  ]
  3. [1         ] [1      ] [Img_1001.jpg] [1st Image for item one]
  4. [2         ] [1      ] [Img_1002.jpg] [2nd Image for item one]
  5. [3         ] [1      ] [Img_1003.jpg] [3rd Image for item one]
  6. [4         ] [2      ] [Img_2001.jpg] [1st Image for item two]
  7. [5         ] [2      ] [Img_2002.jpg] [2nd Image for item two]
  8. [6         ] [3      ] [Img_3001.jpg] [3rd Image for item three] 
All of the fields that start with "PK" are of type "Autonumber" and will be set to the "primary key" for the table
What these fields do is keep a unique record id that is easier, and more stable, to use to relate records from one table to another. (Please read the article about Normalization if you don't understand)
Better yet, this primary key field, IMNSHO, should NEVER change for the record; hence why we have the field for the [PartID] . Field [PartID] can be either text or numeric data type and if the part id changes (say management wants to add a location id or whatever), you only need to update in one place!)

Something to note: [tbl_ImagesToParts]![ImgName ]
In this example I've only used the image file name. In post#2 in the insight article I linked you to the function uses the entire file-path-file name to the image - we can talk about how to handle this later as the function can be changed to search for the image file in various ways depending on the need.

[tbl_ImagesToParts]![FK_Part] is of data type Numeric-Long-Integer
This is the field that we're using to establish the relationship the two tables
(IIRC: In Access2000 > Menu bar > DATABASE TOOLS > Relationships)
In the dialog that opens you add the two tables and then drag-drop
[tbl_Parts]![PK_Part] on top of [tbl_ImagesToParts]![FK_Part]
so you have something analogous to what I have in my school roster database the table between students, classes, attendance etc... (the lines here show 1:1 and 1:Infinity ... that's next)


now change the relationship by RIGHT-clicking on the line (here I show the relationship between the student list and the attendance table.)...


> Set Enforce Referential Integrity to true
Two things here, I do not use the Cascade-Update option because I use the autonumber field as the primary key (again, see the article on Normalization if you don't understand). This field will NEVER change so the auto-update is not needed. The second thing here is that I rarely if ever use the Cascade-Delete option because it's all too easy to lose a lot of information (for example, if we set C-Delete to true, deleted item one in tbl_parts (PK_Parts = 1) then all of the records in [tbl_ImagesToParts]![FK_Part]=1 would also be deleted!!! OUCH (yes, it's happened to me, learn from my mistake) Whereas if C-Delete is set to false then every record in [tbl_ImagesToParts]![FK_Part]=1 would have to be deleted first before the record in tbl_parts could be deleted.

If you look back at post#4 I have something fairly complex; however, the left panel is the parent form, when I select a record the two sub-forms populate...
So, for this example, something really simple would be to setup two forms for example
frm_Parent - data source will be [tbl_parts]
frm_Child - data source will be [tbl_ImagesToParts] and will eventuall be the subform to frm_Parent. Once linked, the related images to the current record in frm_Parent will show. As a stand-alone form all of the images will be available.

Have your part information in the header section of frm_Parent and in the details section of frm_Parent insert the frm_Child as the subform relating the parent to child on between the [PK_Parts] and the [FK_Parts] fields

In the frm_Child, the detail section would have the image control that uses the custom function (that I referred you to in post#2 in the insight article I linked you to - this custom function "reaches out" on to your network, local drive, etc... and finds the image file and then displays it in the image control...
So, because you're stuck with Access2000, before we go any further; the question here is: can you download and open the database and related files in the attachment to the post in the above link?
If not, I can still down grade it to an Access2000 MDB - however, try opening it and let me know 😵
It will be easier for you to understand how the function works and how it is used if you can open that database and related files... to try and explain it would make the post 1000x longer!

10 14121
zmbd
5,501 Expert Mod 4TB
Hello buchert1
Welcome to Bytes.com
You'll find an answer to this exact question here:
https://bytes.com/topic/access/insig...achment-fields

Post#2 has a copy of my database that gives an example of one method I use for this, a custom function.

On a 10 point scale 0=novice to 10=Expert I would put this around an 8

What kind of experience with Access and Relational-Database development do you have?
Do you understand the term "Normalization"?
If not then you'll want to take a look at[*]> Database Normalization and Table Structures.
Jul 26 '22 #2
buchert1
5 Nibble
neither of these have worked...
Can you please help me figure out the correct solution
Jul 26 '22 #3
zmbd
5,501 Expert Mod 4TB
@bucher1 neither of these have worked... Can you please help me figure out the correct solution
Well... you have to help us to help you!
⛔Simply saying "this doesn't work" without any details is not going to result in any reasonable help...
What did you try, what didn't work, what error message(s) did you receive, what do you not understand?
⚠Please take a moment to visit our FAQ covering how to ask a question.

☑The link I gave you has examples of how to implement what you described in your post... is this a custom solution to your situation, absolutely not, Bytes.com isn't a coding service. We're happy to help you with a project; however, if you want someone to custom build the project for you... there are services out there that will do that for you, for a small fee, of course 😉

Using the idea in the archive in post#2 in the thread I linked you to for custom function to pull the image from a file... I use that concept for a class roster... as seen below (sorry, I had to redact the name and the beautiful young lady's face due to privacy concerns):
When I select the student in the left pane, their information is populated, and the picture of that student is displayed.
If one goes the the reports tab in the main form, the student reports will insert the image of the student....
All using the custom function concept as presented in Post#2 of the Insight article I linked you to

Attached Images
File Type: jpg Untitled.jpg (241.1 KB, 293 views)
Jul 26 '22 #4
NeoPa
32,556 Expert Mod 16PB
Hi Buchert.

I will start by commenting that even MDB files are generally better used with Access 2003 rather than 2000, but I don't know your circumstances so I'll leave it there for you to change or not.

The usual approach to handling pictures is to store them on the file system and then, when it comes to showing them on a Form or Report, to update the picture Control to point to the relevant one.

To give more detail I'd need a better understanding of your situation. You describe it, but only cursorily. I expect we can make better progress after you reply with more info.
Jul 28 '22 #5
zmbd
5,501 Expert Mod 4TB
@bucher1
You've already asked this question - please do not double post
Jul 28 '22 #6
buchert1
5 Nibble
Thank you for getting back to me NeoPa!

Unfortunately I am stuck using 2000 due to what work has given me. I will try and give you as many details about the database to help better describe the situation I'm in. This database is being continuously used throughout the day back on the assembly line looking up different part numbers in the search bar I have created using VBA coding. But the problem I'm running into is finding code to help put different pictures that will link with one part number. So in the end they will look up one part number and the picture of that part will show up. But there are many parts so I want to put the picture into the database without actually storing it in the database. I have read about options that are possible but everyone that I try seems to go no where. This is the first project I've used with Access 2000 so I'm still a beginner. Hopefully that is enough info to help you with an answer to the problem! Let me know if I can provide anymore details that will make it easier to resolve the problem!

Thanks!
Jul 29 '22 #7
zmbd
5,501 Expert Mod 4TB
@bucher1 But the problem I'm running into is finding code to help put different pictures that will link with one part number.
Good Morning Bucher,
Now we have something to work with!
If you stick with this... you can do this... however, this is really not a novice project - so be patient with yourself (and with us :) ) we've all been there, and we'll help you get thru this!

📌You are not going to find a single VBA code solution that will show multiple images for a given part.

🏁 HOWEVER - comma...
the Concept of Normalization can help here: > Database Normalization and Table Structures.

So to give you idea as to how I might accomplish what it appears you are trying to do...

Using a very simple construct (I'm going to GREATLY simplify the normalization)
Table with your "Part information"
Expand|Select|Wrap|Line Numbers
  1. tbl_Parts
  2. [PK_Part] [PartID] [PartName] [PartDetail                  ]
  3. [1      ] [124A  ] [Example1] [Just an example part item one]
  4. [2      ] [567A  ] [Example2] [Just an example part item two] 
Table linking each part to a series of pictures
Expand|Select|Wrap|Line Numbers
  1. tbl_ImagesToParts
  2. [PK_Img2Prt] [FK_Part] [ImgName     ] [ImgDetail                  ]
  3. [1         ] [1      ] [Img_1001.jpg] [1st Image for item one]
  4. [2         ] [1      ] [Img_1002.jpg] [2nd Image for item one]
  5. [3         ] [1      ] [Img_1003.jpg] [3rd Image for item one]
  6. [4         ] [2      ] [Img_2001.jpg] [1st Image for item two]
  7. [5         ] [2      ] [Img_2002.jpg] [2nd Image for item two]
  8. [6         ] [3      ] [Img_3001.jpg] [3rd Image for item three] 
All of the fields that start with "PK" are of type "Autonumber" and will be set to the "primary key" for the table
What these fields do is keep a unique record id that is easier, and more stable, to use to relate records from one table to another. (Please read the article about Normalization if you don't understand)
Better yet, this primary key field, IMNSHO, should NEVER change for the record; hence why we have the field for the [PartID] . Field [PartID] can be either text or numeric data type and if the part id changes (say management wants to add a location id or whatever), you only need to update in one place!)

Something to note: [tbl_ImagesToParts]![ImgName ]
In this example I've only used the image file name. In post#2 in the insight article I linked you to the function uses the entire file-path-file name to the image - we can talk about how to handle this later as the function can be changed to search for the image file in various ways depending on the need.

[tbl_ImagesToParts]![FK_Part] is of data type Numeric-Long-Integer
This is the field that we're using to establish the relationship the two tables
(IIRC: In Access2000 > Menu bar > DATABASE TOOLS > Relationships)
In the dialog that opens you add the two tables and then drag-drop
[tbl_Parts]![PK_Part] on top of [tbl_ImagesToParts]![FK_Part]
so you have something analogous to what I have in my school roster database the table between students, classes, attendance etc... (the lines here show 1:1 and 1:Infinity ... that's next)


now change the relationship by RIGHT-clicking on the line (here I show the relationship between the student list and the attendance table.)...


> Set Enforce Referential Integrity to true
Two things here, I do not use the Cascade-Update option because I use the autonumber field as the primary key (again, see the article on Normalization if you don't understand). This field will NEVER change so the auto-update is not needed. The second thing here is that I rarely if ever use the Cascade-Delete option because it's all too easy to lose a lot of information (for example, if we set C-Delete to true, deleted item one in tbl_parts (PK_Parts = 1) then all of the records in [tbl_ImagesToParts]![FK_Part]=1 would also be deleted!!! OUCH (yes, it's happened to me, learn from my mistake) Whereas if C-Delete is set to false then every record in [tbl_ImagesToParts]![FK_Part]=1 would have to be deleted first before the record in tbl_parts could be deleted.

If you look back at post#4 I have something fairly complex; however, the left panel is the parent form, when I select a record the two sub-forms populate...
So, for this example, something really simple would be to setup two forms for example
frm_Parent - data source will be [tbl_parts]
frm_Child - data source will be [tbl_ImagesToParts] and will eventuall be the subform to frm_Parent. Once linked, the related images to the current record in frm_Parent will show. As a stand-alone form all of the images will be available.

Have your part information in the header section of frm_Parent and in the details section of frm_Parent insert the frm_Child as the subform relating the parent to child on between the [PK_Parts] and the [FK_Parts] fields

In the frm_Child, the detail section would have the image control that uses the custom function (that I referred you to in post#2 in the insight article I linked you to - this custom function "reaches out" on to your network, local drive, etc... and finds the image file and then displays it in the image control...
So, because you're stuck with Access2000, before we go any further; the question here is: can you download and open the database and related files in the attachment to the post in the above link?
If not, I can still down grade it to an Access2000 MDB - however, try opening it and let me know 😵
It will be easier for you to understand how the function works and how it is used if you can open that database and related files... to try and explain it would make the post 1000x longer!
Attached Images
File Type: jpg Capture1.JPG (34.4 KB, 254 views)
File Type: jpg Capture2.JPG (37.3 KB, 242 views)
Jul 29 '22 #8
NeoPa
32,556 Expert Mod 16PB
Hi Buchert & zmbd.

I can see that Z has already put a great deal of effort into this question so I would expect anything I add simply to muddy the waters for everyone concerned.

@Buchert.
Please take Z's instructions on board about not reposting questions. He's saved me having to give the same. It simply wastes people's time and also tends to upset those who find out later their time was not well used. It's perfectly excusable on the first occasion though of course.

If at any time you feel a response doesn't give you everything you need, or even that you struggle to understand it, then feel free to post back to explain clearly what you're struggling with. When we know what it is that you don't understand we can put our focus to where you need it most. The converse is also true of course. If we don't know then we can't.

Good luck & welcome to Bytes.com.
Jul 29 '22 #9
zmbd
5,501 Expert Mod 4TB
@Buchert.
When you get your database lined out... please drop by - success stories make the best reading material!
Aug 2 '22 #10
buchert1
5 Nibble
Hello zmbd,

Unfortunately I still haven't figured out how to connect to two tables to the data table being able to connect everything together. I got the part of making the tbl_Part and tbl_ImagestoParts but then trying to connect everything throughout relationships and queries is getting to my head a little bit. I know you said it would take a lot longer to explain but if you could explain how to put it into a MDB that would be fantastic. Again very sorry but I think my lack of experience is getting to me a little bit. So my overall final question would be how to connect the tables and make it all into one mega form with everything connected to it.

Thanks again
Aug 2 '22 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Mathew Hill | last post by:
I am a beginner to the more technical aspects of Microsoft Access (2000) and was wondering if any one can help? I have a field in a table called: ADMIN NUMBER This field should have 4...
6
by: Helmut | last post by:
Hello, I am Helmut, my database has a Frontend of 15.4 MB which cause Acc2K to corruption: Limit is 12.5 MB. Service Pack 3. On three different PCs with 256, 512 and 1.000 MB RAM. All on W2K,...
0
by: alisae | last post by:
Hello. I have a HP6630 Computer, Windows Xp Professional, Office Xp Standard Edition and a standalone version of Microsoft Access 2000 sr1 on a separate cdrom. The problem is every time I want to...
4
by: Thelonious Monk | last post by:
Is it possible to convert Microsoft Access 2000 forms and import them into a Visual Basic .NET project? This may be a far-fetched question, but it sure would be nice to do. Thanks!
0
by: vaahini | last post by:
i have upgraded our database from microsoft access 97 to microsoft access 2000. While executing i face problem (Unknown database found) in crystal report 7.0. How to solve this problem. the platform...
2
by: JKChan | last post by:
Hi, I'm an A2 ICT student in second year of college right now and I am working on my database project as my coursework. Its about a dance school with 4 tables Student, Class, Teacher and Enrolment. ...
8
by: diasdaman | last post by:
I know how to import text files, but in this case I need to import a text file line by line on an on-the-fly basis, such that the Access will look at the first two digits of a line, and then import...
0
by: napstar | last post by:
Is it possible to have Access(2002,2003 or 2007) replicate(as publisher) data to SQL Server 2005 or 2008?Code samples would be nice,links would be greatly appreciated.
1
sword117
by: sword117 | last post by:
i want to count all the rows values in a column, example: -- euro -- 21 43 44 45
1
by: Gevorg Nersesya | last post by:
Hello everybody, I have a lot of jpg image files and would like to store them in Microsoft Access 2000 mdb database. I am inserting the images into the database without any problems. But the...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.