Help: Displaying Pictures In A Form
Nov 28, 2007
To display images on a form (Access 2003) I used the same code of the Northwind database sample (Form Emplyees).
when changing the Picture's location it returns a bug in the code (Couldn' open ...the file), or the ErrorMessage Label should have the value: "File not Found".
Here is the code:
Private Sub Form_Current()
Dim res As Boolean
Dim fName As String
Path = CurrentProject.Path
On Error Resume Next
ErrorMsg.Visible = False
If Not IsNull(Me![ProductPicture]) Then
res = IsRelative(Me![ProductPicture])
fName = Me![ImagePath]
If (res = True) Then
fName = Path & "" & fName
End If
Debug.Print "fName: " & fName
Me![ImageFrame].Picture = fName
showImageFrame
Me.PaintPalette = Me![ImageFrame].ObjectPalette
If (Me![ImageFrame].Picture <> fName) Then
hideImageFrame
ErrorMsg.Caption = "File not Found"
ErrorMsg.Visible = True
End If
Else
hideImageFrame
ErrorMsg.Caption = "Click on Add/Edit to add the Product Picture"
ErrorMsg.Visible = True
End If
End Sub
Function IsRelative(fName As String) As Boolean
IsRelative = (InStr(1, fName, ":") = 0) And (InStr(1, fName, "") = 0)
End Function
#
View Replies
ADVERTISEMENT
Oct 7, 2013
I'm trying to place a picture on my forms using a browse button code i found on the net. After picking a picture, the image won't display automatically during run time, i still need to select design view and finally form view just to display the image. Im using the events form current, and the text box afterupdate.
View 1 Replies
View Related
Jul 28, 2005
Greetings All.
I have a problem that just began occurring with the pictures on my forms.
I have the forms linked to pictures in a folder called “Pics”. In the information table, the field for the pictures reads “\B2r101t3Pics 00-00-0000.jpg” where “B2r101t3” is the computer name, “Pics” is the directory (Separate from the directory in which the DB’s Back-End lies), and “000-00-0000.jpg” is the name of the image file.
The above worked fine till about a week ago when all new pictures added did not display on any satellite computers. They do, however, display properly on the computer on which the Back-End lies. So I now have a situation where some pictures are displayed and others not. I have not made any changes to the DB or Pictures, and everything else works just fine.
Does anyone have any insights as to why this may be happening? I would, as always, appreciate any pointers.
Thanks,
Bonie.
View 2 Replies
View Related
Jan 31, 2005
I am using Access 2003 in a simple database and want to add digital pictures of each item in my database.
Before trying to enhance the database with pictures; the various fields are filled with either descriptive text or numbers. The size of the mdb database file is 464k.
I recently wanted to add a picture of each database entry. After adding a picture that is only 300k in size the mdb file increase to 18MD. Then after adding another picture also of 300k bytes my database grew to 25MB.
In the drop down menus Under Tools - Database Utilities - I ran the Compact & Repair Database. This did not reduce the size.
In the database Form I am using a Bound Object Frame to hold the picture and yes I am not linking the picture I am including it in the database. But, would only expect it to increase the database size by slightly more than the picture size.
I should also point out that the only way I have found to get the picture to be visible (not just an icon of the type of picture file) is to right click on the Bound Object Frame scroll down and choose Insert Object. Click on Create New and select Adobe Photoshop Image. This open adobe photoshop I make sure the picture properties are creating a picture of 300k.
So my question(s) is again. Why is my database increasing in size so rapidly? Is there a better to insert picture into a database?
Regards, Roy (HerlocherR@aol.com)
View 2 Replies
View Related
Apr 19, 2007
Thanks for reading another one...
I am building an application for my marketing dept. that will track their mailouts. So far I can handle it; however, they want a thumbnail displayed of each piece of creative. I can do this if they only wanted to see one record at a time, but they want all records w/in a certain date range and the pic that goes with it. I am currently storing the path to the image so not to gorge my db to explosion.
pic campaign_name start end mail_out #_pieces
pic campaign_name start end mail_out #_pieces
pic campaign_name start end mail_out #_pieces
pic campaign_name start end mail_out #_pieces
where pic is the thumbnail. I have built it with a continuous form so I can display all the records but I am up to change if needed.
I have read other posts and they all deal with single forms and the onCurrent event is not really working for me.
Any and all help is greatly appreciated!
View 10 Replies
View Related
Oct 16, 2014
I'm trying to add pictures to a form (not in the database, just a graphic on the form).
In 2010 there is an "insert image" button. Is there one in 2007 and if not how would I do that?
View 3 Replies
View Related
Aug 6, 2005
To start off I have only been working in Access(2003) for the past 2 months. And Yes I am a neebie of all neebies but please read on.
What I am trying to do is for every record I need to associate multiple pictures of damages to items in for repair. For example I have an High end Amplifier that came in for repair and the outside has markings of a fire(thats one pix) then opening it up we see that the fuses, wires and PC board has fire marks also(pix two) and so on. The record is keyed to the serial number. On the form my fields are Serial number, RMA #, all the senders info (name,address, contact number, store purchased, etc.). Then I created a subform for the picture with the following the picture itself, buttons(previous, next, add pic, delete pic) a hiden textbox(serial number) that I have joined(relationship) to the major form(serial number).
How do I link the pic to that specific serial number and then other pictures that also link to that serial number.
I know its wordy but I wanted to make it as clear as I could.
Thank You
Roborro
View 1 Replies
View Related
Jun 26, 2013
I made a db with tons of forms and they all have pictures on. I want to know if there is a quick way to embed them all so I don't have to go in the settings of every picture and do it manually!
View 1 Replies
View Related
Aug 26, 2014
I have a split form that's like a list of pending tasks. The data source is a linked SharePoint 2013 list where users submit requests. The user takes the information from each record and performs an action. When it is done, the user presses a button and the task status changes from "Pending" to "Processed". The form record source is based on a query that finds only records with a status of "Pending" so when the user changes the status of the task, it is removed from the list. It works fine except when there is only one task left in the work list. If the user processes the last task, the form refreshes and it goes to a new empty record and I get an error message that says I must enter a value into one of the required fields. I tried making the field non-required but it just creates an empty record in the table.
View 3 Replies
View Related
Jun 9, 2007
Hi,
I'm using Access 2000.
After a very very very long time i've manged to crack my first QBF! When I click the command button to run the macro and display the results, the results are coming up in a table format.
Is there any way to have the results of the QBF displayed on the same form?
For example, if I have a table that contains my different products and their categories - in this example 50 different types of "toy trucks", 75 "toy cars" and 100 "toy trains" - and I then perform a QBF on the criteria of product type, in this example "toy cars" - I would want the first "toy car" record to show on the form in their relevant fields, and be able to scroll through 74 records before coming to an end.
This way I could easily place all my products in one table, then select which products I'd like to view in the form and scroll through them.
Any help would be greatfully appreciated as I haven't been able to find anything online.
Thank you in advance.
View 1 Replies
View Related
Mar 16, 2006
Hi -
Trying to display PDF in a form. Ideally, I would like to link one or more PDF's to each record in a table and be able to view the PDF within the form. Opening the file via double-click would be a nice bonus.
I've looked at a helpful post here
http://www.access-programmers.co.uk/forums/showthread.php?t=100877
which describes doing this through ActiveX
Part of my trouble is I don't understand the ActiveX well enough. I was able to make this work with a sample file, but then I lost all the tool bars that were on the document and can't get them back. I also can't figure out how to get the double-click to open to work. Is there documentation somewhere on the ActiveX control?
I also tried using an OLE object. I can create a form in design view that contains a linked PDF, but I can't figure out how to index off a table. I also can't figure out how to resize (for a thumbnail, for example).
Thanks for any assistance,
- gromit
View 2 Replies
View Related
Jul 19, 2006
:confused: ok basically im trying to create a form for customer details for a project at college, what I want is:
select customer ID from a drop down list, which then should display all their details below such as address etc(from the linked table), which cannot be edited or nothing, like looking up information. can anyone help me please???
all help would be much appreciated! :)
View 1 Replies
View Related
Dec 15, 2006
:confused: I am setting up a referral system with a datebase on access. I want to have a form where I can enter a date of referral and the results are displayed in a form style? How do I do it?
I have set up a form to enter the date, with a submit button, and this return the results in a dataview/spreadsheet style. But I want to display in a form so that I can edit later.
I am a novice in Access - Any help!!
View 1 Replies
View Related
Feb 10, 2005
I recently have made some changes to a bound form that someone else created. Since I made the changes, simply adding a couple more linked textboxes, the form will not populate any of the fields until I lose focus from this main form to another form and come back. I have tried adding me.requery, me.refresh to the onActive event, but it does not work.
Also this only occurs on 2 machines. If I try it on mine or a couple of other computers in the company the program works fine.
I am at a complete loss as to what to do and could really use some help on this one.
View 6 Replies
View Related
Jul 25, 2013
I have a table which has a yes/no field, in the table everything displays as either Yes or No, unless you click on it to edit it, whereby No become 0 and Yes becomes -1.This isn't a big problem as users can only access forms. On the input form this is a check box, checked for Yes and unchecked for No. This used to be a drop down selection box of Yes and No and the same problem was occuring, so I know the problem doesn't relate to the check box.
I have a second reporting form which has multiple combo boxes to filter down results in a subform. In the subform the field correctly displays as Yes and No, however, the filtering combobox for this field has the options 0 and -1.
The combobox is set up as Yes/No, the table is Yes/No and the results are Yes/No. There is no other formatting or input options that can be changed to tell the database this is a Yes/No field.How can I get this combobox to display as Yes/No? It's causing a lot of confusion with users as they are having to select 0 or -1.As a note, I've already tried the following:
-Deleting the combobox and starting again.
-Deleting the table and combo box and starting again.
-Deleting all tables, queries and forms which use this field and starting again.
None have worked, this seems to be something Access is doing rather than an error in what I've done.The filter form uses this code, which may be the cause:
Code:
Option Compare Database
Option Explicit
Private m_colCombos As Collection
Private m_strFilter As String
[code]....
View 3 Replies
View Related
Oct 29, 2012
In my table of assembly numbers where each assembly number has a set of work instructions as a pdf file. I'm wondering if it is possible to display the pdf file as an object within a form..?
I know its possible to open this document as a hyperlink but I want it to be embedded within the form.
View 1 Replies
View Related
Jun 17, 2006
I have created a Query to search for clients in my database, the query and the search all work fine, however it would be nice to have the query post the results into a form I have created to display clients data rather than posting the results in a tables view.
Is there anyway todo this?
Thanks in advance.
View 1 Replies
View Related
Jan 27, 2006
I have a combo box with a list of names in, and a table for each of those people.
When one of these names is selected, i want the contents of the corresponding table to display in a form. Easy Enough.
But...how do I get these tables displaying in one form depending on which name is selected, to save me having 7 copies of the same form just with different sources. All the field names are the same.
One solution I thought of is to put all the data in one table, but would really rather keep it separate.
TIA
View 2 Replies
View Related
Sep 13, 2006
Forgive me for what may sound like a dum question -- Access is completely new to me.
I have my table. I have this displayed as a form.
At the bottom of the form, I have a text box and a command button.
The user enters in a key value. The command button triggers a macro that runs a query.
Now, I'd like the form to display the data returned from the query. How?
I tried creating a new form with its Record Source set to the query. I had the macro close the original form, run the query and open the new form. But before the new form could be opened, Access prompted me for a 'parameter value' (I assume so that the query could be run again).
What am I doing wrong?
View 3 Replies
View Related
Dec 15, 2006
I searched the archives and Access Help and couldn't quite find the answer to this question, which is no doubt simple.
I have a form showing Projects with an embedded subform showing all the Buildings associated with a given project. In the form footer section of the subform, I would like to display summary information about the buildings in the project being displayed, such as count of buildings, count of residential buildings, count of commercial buildings, and so on, and I would like these summary values to update as users add or change building information.
I know how to write the SQL query to pull this information, but do I use a text box or some other vehicle to do this? Using a text box as a calculated control, I was able to produce the count of buildings using:
= COUNT([UnitID])
To get the count of residential buildings, I need to be able to specify "WHERE bldgtypeID = 'R'"...I can't get the text box to display results of an SQL statement. Can text boxes handle SQL statements?
I really appreciate any suggestions you have.
View 10 Replies
View Related
Oct 7, 2004
Hey Guys,
This one could be a tough one.
I have a form that displays products information.
The products table has about 30 fields but not every field is used in every record.
Depending on the product I would like those fields that are blank not to appear on the form and then for the form to be reorganized so there are no odd spaces.
Is this possible?
Thanks!
View 5 Replies
View Related
Nov 16, 2004
Dear All:
I am curious to see if threre is a way to display the number of records on a form in a text box. I know access has this number on the bottom of the form, but it's a vision issue for me.
Any ideas on how to get this done?
I am most appreciative of all the help.
Regards,
Dion
View 2 Replies
View Related
May 17, 2005
Anyone know how to display multiple records at the same time on a form?
View 1 Replies
View Related
Nov 23, 2005
I have a form in which I want to retrieve images from a folder. Each record contains a txt field where the path of the image is located. Not every record contains a path to the image file as some records does not have images. I have created an image field in my form and used the following code: Me.Image129.Picture = Me.imagetxt to retrieve the image. I would like to display an image containing the words "No Image" whenever the imagetxt field is blank. How would I do this. I cannot go back and fill in the blank imagetxt field with a path as I am pulling the data from an external source. Also, would this be the same method if I am creating an image field for a report? Any help would be greatly appreciated.
View 2 Replies
View Related
Feb 26, 2008
Hi everyone,
I have a query which totals the amount of all invoices for a specific project number. I would like to take this total and have it displayed on the form from where overall project information is inputed.
Right now I have a table which shows general project information and a table showing invoice infomation (linked to the general table via a project #)
I also have two forms, one for general info and there's a button which opens the invoice form. When the invoice form opens, it opens an invoice with the corresponding project number shown on the general form. I would like the total invoice amount (from the query) displayed on the corresponding general form.
ex: in the general form for project# 100, I click invoice once and enter $50, I click invoice again and enter $100. The query automatically shows a total of $150 for project# 100. I would like this $150 displayed on the general form for quick reference.
Thanks for all the help
View 1 Replies
View Related
Aug 28, 2013
I have been given a form that you pass a parameter into and on the basis of this it performs certain amendments to the particular data AND also runs 2 stored procedures on this data. I need to get the data to display on the form so that the user can visually verify if it is the correct data and then they will on click to execute the amendments and stored procedures.
I cannot get the data to display on the screen? I have tried to create a variable in the VBA code to store the data in and then used a message box to try to display it but to no avail?
View 3 Replies
View Related