473,411 Members | 2,272 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,411 software developers and data experts.

Union Form Alternative Image Controls

So here's the long version:
I'm trying to get the image associated with each record to be displayed in the "picture" field of a form. I usually have much success doing this by using attachment and hyperlink fields. So far, displaying images in forms have not been a problem because I have never had to union the records from all my tables and display them in a "read and write" form, but now that I have to, it seems that the union query does not support multi-valued fields except OLE objects, but as it turns out, although the union query can run with an OLE field, the images attached to the field can not be displayed by conventional means (I watch youtube for this kind of thing), for now, the only that's that's worked is converting the hyperlink fields (which contains all the pictures) into a short text field (which is much easier than trying to figure out each individual file path name). I did some coding according to a video i watched and it worked. but the problem I'm having now is that although the image is displayed (based on the filepath) there seems to be no way of editing them (adding/removing/replacing) through the form. it's just there and I want my users to be able to add not only records of each student, but also attache their photos as well.

Short version:
So here's my real QUESTION:
is there a way to create an "insert image" button/option that links to the picture (short text) field that would let me add/remove a hyperlink as I would for a normal attachment field. likewise, if there are any alternatives to the union query (because its been giving me a lot of problems anyway), suggestions would be great.
Mar 25 '16 #1
2 1395
PhilOfWalton
1,430 Expert 1GB
Bad news: The fields in UNION Queries are not editable. Assuming each half of the UNION Query is editable (and many queries are not) it sounds as if you will have to use 2 separate forms

Phil
Mar 25 '16 #2
jforbes
1,107 Expert 1GB
It's quite possible that if you are using a union query, you may want to reexamine your table structures. In a well designed database, unions aren't used very often, and it's very rare that a Form's RecordSource is based on a union query.

This a good resource that explains database normalization, which may be of benefit for you: Database Normalization and Table Structures

I would also highly recommend not using multivalued fields. This also goes back to a well designed/Normalized database. Multivalue fields aren't exactly normalized, which also means that they do not query well, or at all. For any field that you would have a multivalued field, I would create a separate table and link it to the Primary Key of the base table. For editing and display purposes, you can use a Sub-form.

Lastly, for your actual question, the ImageControl itself doesn't support any lookup functionality for the Image. Basicaly, the ImageControl is Read Only. You will have to write that yourself. Mostlikely by placing a button somewhere close to the Image to allow the user to select a file. This is a good place to start for a File Seleciton Dialog Box: Select a File or Folder using the FileDialog Object
Mar 25 '16 #3

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

Similar topics

2
by: tom | last post by:
Hello, does anyone know if and how it is possible that when you use an image as backgroundimage of a form, this image adjusts itself when the form resizes. Sth. like 'StretchImage' for a...
0
by: JF Turcotte | last post by:
Hi I'm unsuccessfully trying to print a form's image under VB.NET. To print under .NET is a real pain in the , I find it to be complex, lenghty, confusing, upsetting and ultimately not to be...
5
by: joe | last post by:
Hi. Is there a way with Javascript to use a generic image if the one I want is not found? I'd appreciate if someone can post a code sample, or poit me to one. Thanks in advance.
4
by: Ann Marinas | last post by:
Hello! Is it possible to get all of your controls in a form and store it in a collection (for populating puposes)? If yes, how can you store it and retrieve it while determining the element's...
5
by: Stan Shankman | last post by:
C# -- Visual Studio.Net – Windows Application Greetings all, How do I copy a Form’s image to a bitmap? – And do so before it gets to the screen. I haven’t been able to find anyone that knows...
1
by: some good man | last post by:
Hi How do i print the a form with its controls? I know how to print, but when i want to paint the form onto the printerdocument control, i have to paint from an image, but the form doesnt even...
3
by: Dave | last post by:
Hey all, I have a problem and I can't find anything on the net to really address it. We have a program at work that has lots of numbers on the front of the form because it is a control program...
2
by: nishi.hirve | last post by:
Hello, I am writing 1 client-server application in which I have written my server in C on linux system and client in C#. My server is sending image bytes of that image size to the client....
0
by: =?Utf-8?B?VmljdG9y?= | last post by:
Hi, I have a problem with the Form Editor VS2008 in a C# Windows application. Form Editor seems to change size of some controls to an arbitrary large values by its own will. I position,...
15
by: noclueforid | last post by:
Hello! On my main form I have two date controls, dtmTrainingStartDate and dtmTrainingEndDate. On a sub form, I have a date control dtmWeekEndingDate. What I would like to do is auto-populate the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.