Auto Image Change

Sep 30, 2005

I have a form with cbo and the following code:

Private Sub cboOrderLocation_AfterUpdate()
If Me!cboOrderLocation = "Paradigm" Then
Me!txtOrderLocation = "PA"
Me!txtExpressAddress = "Paradigm Address"
Me!imgSelect = "LogoSmall.jpg"
ElseIf Me!cboOrderLocation = "Unassigned" Then
Me!txtOrderLocation = "NA"
Me!txtExpressAddress = "Not Assigned"
ElseIf Me!cboOrderLocation = "Express" Then
Me!txtOrderLocation = "EX"
Me!txtExpressAddress = "Slover Address"
Me!imgSelect = "LogoSmallParadigm.jpg"
End If
End Sub

The Me!txtOrderLocation and Me!txtExpressAddress both work great! I want to have it change the logo / image the same way. Is this possible? If so can someone tell me or show me how? I created an image on the form with the name imgSelect but when I compile it of course is giving me an error.

Thanks!

View Replies


ADVERTISEMENT

Change Colour Of Image Border

Apr 14, 2005

...but I'v got a picture and I want to put a red box behind it so the picture looks like it has red borders, the problem is that the box always appears above the picture, I'm sure there must be a way to prioritize them or something but I can't find it!

View 3 Replies View Related

User Change Image On Form

Sep 25, 2005

Wonder if you guys can help, I have searched the forums, but can't find an exact match to my query...

... i want my users to see a coloured image on their form to alert them to the status of a record in the database.

I have 3 very small bitmap images (named red, amber and green and stored directly next to my database ). I want to allow users to change which image should display on any given record by choosing either from a combo-box or radio buttons located next to the 'image space' on the same form. This image change will then save when the database is closed and remain until it is changed to another staus by a subsequent user at a later date.

Any ideas greatly appreciated (I'm currently at [I]'dimwit' level with coding)

Id

View 3 Replies View Related

Prevent Cursor From Moving On Image / Form Change

Feb 8, 2007

I've created a form. Within that form I have an image control. I am using this code to pull the corresponding plant image from a folder filled with JPGs.

It works just fine except one thing. When I change from record to record my cursor jumps to the center of the pulled JPG. I don't want my cursor to move at all when loading these images. Is this possible? Thanks.


Private Sub Form_Current()

Dim FileExistsbol As Boolean
Dim stFileName As String

stFileName = CurrentProject.Path & "- Landscaping Material Images" & _
[LandscapeCommonName] & ".jpg"
stFileName = Trim(stFileName)
FileExistsbol = Dir(stFileName) <> vbNullString

If FileExistsbol Then
[LandscapeMaterialImage].Visible = True
Me![LandscapeMaterialImage].Picture = stFileName
[LabelNoPictureAvailable].Visible = False
Else
[LandscapeMaterialImage].Visible = False
[LabelNoPictureAvailable].Visible = True
End If

End Sub

View 2 Replies View Related

Linked Image Path Change Doesn't Work?

Mar 18, 2008

Hello. I've searched and read a few threads concerning image controls on forms and haven't been able to find a solution to my problem (yet). Anyway, I have a form with two image controls (imgOK1 & imgOK2). The previous and current setting of the "Picture" property for both images is set to "C:MOMGraphicsfilename.bmp". The location of my images has changed and will change for each user which is "C:Documents and Settingsuser.nameMOMGraphicsfilename.bmp". I'm using the following code to set the .Picture property on form load:

Dim ImgPath
ImgPath = "C:Documents and Settings" & Environ("username") & "My DocumentsMOMGraphics"
Me.imgOK1.Picture = ImgPath & "imgButton-OK1_25%.bmp"
Me.imgOK2.Picture = ImgPath & "imgButton-OK2_25%.bmp"

When the form is opened, an error stating that the image located at "C:MOMGraphicsfilename.bmp" cannot be found; once for each image control. Then the form loads and .Picture properties appear to be set correctly as they are displayed fine. I've tried to clear the .Picture properties for both image controls using the properties editor but the original path returns as soon as the property loses focus. Is there a way to programatically set this property and make it stick so the errors are not displayed?

View 7 Replies View Related

How Do I Change An Image (Ole Object) In A Form When Changing Value Of A Combo Box?

Mar 14, 2007

My Db has 1 table with 4 columns named ID, First_name, Last_name and Photo.

ID is a counter and primary key.
First+last names are text fields.
Photo is an Ole object.

I display everything in a form that is controlled by a combo box. The combo box displays the first name and when I chage the first name with this box the last name changes too. I use this code together with the event "after update"

Code:Private Sub Combo_First_name_AfterUpdate()Me.txt_last_name.Value = Me.Combo_first_name.Column(2)

Everything works perfectly fine (txt_last_name changes according to the first name in the combo box), except that the photo of the person doesn't change. Nothing happens to the photo when changing value in the combo box or it just displays a message box with an error messages when I have tried to get it to work.

I want the ole object picture to change too, when changing the first name in the combo box.

I hope you can help me out here.

View 4 Replies View Related

Forms :: Change Image Back Color On Click

Apr 30, 2014

I have images in my form, say, Image1 and Image2 . The default background color for all of them are white. If the user click image1, the background color has to be red. If the user click image2, the background has to change to red and the image1 retains its default color ( White ).

I have six images to loop through these. Image1 to image6.

View 8 Replies View Related

Forms :: Image Change Based On Combo Box Selection On Form

Jun 21, 2015

I have been looking some information on changing image based on form combo box selection on form.

I manage to do case by case but i need it in a simple code because their will be many employees just to avoid adding case by case code for each one.

Private Sub Emp_IDCombo_AfterUpdate()
Select Case Emp_IDCombo.Value
Case "AM-001"
Imageholder.Picture = "C:UsersAMGDesktopam-001.jpg"
Case "AM-002"
Imageholder.Picture = "C:UsersAMGOne DocumentsHR & Admin DatabaseEmployee Picturesam-002.jpg"
End Select

I have employees table where all images location is saved in text field and i have a combo box on form which is employee id.

Tables relationship
Employees_table [PK] to Contracts_table [FK] via field name {emp_ID}

Fields Name
Combo Box name on form Emp_IDCombo and row source is SELECT Employees_table.Emp_ID, Employees_table.EmployeeName, Employees_table.Emp_Pics FROM Employees_table;

Text field is located in employees_table called [Emp_Pic] for images location.

View 10 Replies View Related

Date Auto Change Overide

Sep 23, 2005

I have just upgraded my large client database from Access 97 to Access 03. Unfortuntely all date of birth prior to 1930 are being displayed as 20??. IE date of birth 1928 displays 2028. Is there any way to automatically change this without altering the input mask and changeing each record individually. I have approx 15000 on the database, so not looking forward to doing it manually.
Any suggestions appreciated.

View 2 Replies View Related

Auto Change A Field When Another Is Updated

Jul 13, 2006

I have a form where sales can be entered. Whenever a [salesdate] is entered, I would like the [status] to automatically change to "Sold". How can I go about doing this?

View 1 Replies View Related

General :: Change Auto Number

Jan 27, 2015

before ACCESS Excel was used to create orders etc,we are up to order number 16223 now I have access and the auto number will start at 1.how can I get the auto number to start at 16223.

View 11 Replies View Related

Change Primary Key To Auto Number?

Nov 19, 2011

Can I change the primary key currently set to my products description to an auto number? I'm trying to make things right, also does the foreign key get an auto number?

View 2 Replies View Related

Modules & VBA :: Auto Numbers When Priority Change

Jul 3, 2014

I have a very basic application to manage the tasks. In the main form "Tasks" one of the field is the priority (Order by) and I have this example:

Task Priority

B 1
A 2
C 3
E 4
D 5

If the user change one priority, I need a code to automatically change the others too respecting the new priority order. For example if the user change the priority 3 to 1 for the task C, the other numbers have to change to become:

Task Priority

C 1
B 2
A 3
E 4
D 5

There is a way to do this?

View 5 Replies View Related

Auto Colour Change Depending On Text Selected

May 5, 2005

:) Hello

Is it possible to change the colour of the text in a table. For example the word "URGENT" is selected from a combo box, and when viewed in the table it appears red.

Thanks inancipiation

Woozie

View 1 Replies View Related

Manual Auto Numbering Subject To Change In Date Field

May 18, 2006

Greetings everubody,

I've a problem and hope to get answers for,

The situation is that I have a table named patient and a form named [patient1] where it holds a textboxs named "MFC_Seq_no" and another to hold [date], now, I manged to do a manual auto numbering for "MFC_Seq_no" using the following VB :

Private Sub Form_Current()

If Me.NewRecord Then
On Error Resume Next
Me!MFC_Seq_no.DefaultValue = Nz(DMax("[MFC_Seq_no]", "Patient"), 0) + 1
End If

Whenever user create new record, the system will automatically store the next number in the new record.

Now, I've be requested to code that system to start again from 1 as value for "MFC_Seq_no" whenever there are changes in date field (i.e. next day in the date field)

Is this doable and how?

Q2. how to duplicate an entire record with a subform, from another table, in it?

Thanks,

View 2 Replies View Related

Force Auto Number To Change According To Filter Applied On Table

Jul 6, 2012

I have a table and it is like this 1 a 2 b 3 f let's assume i want to add new data {C} so it will be like this : 1 a 2 b 3 f 4 c

Is their any way i make the table look like this 1 a 2 b 3 c 4 f can i force the auto number to change according to the filter applied on the table is their a numeric field can be used instead on auto number that can be changed according to the filters

View 4 Replies View Related

Modules & VBA :: Changing Image Path - Set Picture Property Of Image

Dec 4, 2014

I have a form that I would like to update a picture on using VBA. The source of the picture path is in part a query that is not bound to the form. So far I have the following code that is pretty much working, but with a couple flaws.

Code:
Private Sub Form_Current()
LoadDefaultPicture
End Sub
Sub LoadDefaultPicture()
Dim db As DAO.Database

[Code] ....

This is working. However, when I change the record the picture flashes the current picture once and then loads the new picture. It is like it reloads the current picture then loads the new one. I'm hoping there is a way to get rid of the flash.

Also, the code fails here:
strDefaultPictureName = rs.Fields("AttachmentName")

When the query does not return a record. I can definitely fix this by adding an if statement to check for a record, but I'm kind of perplexed at why it is failing at that line. I would expect it to assign an empty string to that variable name and then fail on the next command where I try and set the ".Picture" property of the image.

View 8 Replies View Related

Queries :: How To Create Auto-grouping Based On Change In Previous Record

Jun 29, 2015

I have a column "CAT" each time that CAT switches between 0 and 1, I would like my query to auto-create a "grouping" and increment the group by 1. What I am looking for is the output as shown below.

ID CAT GROUP
67 0 1
68 0 1
69 0 1
70 1 2
71 1 2
72 0 3
73 0 3
74 0 3
75 0 3
76 1 4
77 1 4

View 6 Replies View Related

How To Embedd Image In Image Control Using Imagelist.

Feb 6, 2005

Hi all ,
Can anyone tell me about how to embedd image in image control using imagelist.
I added the 5 images in imagelist at design time and added the following code.
image.picture=imagelist.listimages(1).picture
but iam getting error.error no :2110,cannot open the file .
thank u,
Siva

View 3 Replies View Related

General :: Auto Number PK Change Starting Number?

Dec 18, 2013

I have a table with an auto number PK. This table will contain orders. I'd like to use the PK from this table as the Invoice number on the invoice. I'd like to have it start at a number other than "1" just because it looks better on an invoice. I don't know how to do this. I looked at the table design to see if there were options available to me there but couldn't find anything. Is it possible? (I do not know how to use code.)

View 7 Replies View Related

Click Image Hyperlink In Form To Load Image To Form

Jun 16, 2006

Hi guys,

I'm in desperate need of help and want to know if it is possible to load an image on a form once a hyper link is created.

For example, I have a form with a hyper link to an image created, currently, when you click on the hyperlink, it opens the picture in the browser, can you change it so that it loads teh image embedded into the form instead of loading it into a browser?

If so, how?

Thanks

View 1 Replies View Related

Auto-trim / Auto-crop A Picture & Screenshot

Mar 20, 2006

we use access database for printing lab reports. and a small graph is also printed on this report from another software(not an access application).

what i have done is that first we print the txt report from access and then use the same paper to print graph on it. I have alligned the report in such a way that these two reports fit perfectly.

we have to print twice and sometimes the graph is deleted in the other application, so we have to make the graph again.

what i want to do is:
1) prepare graph in the other application.
2) take a screenshot of it.
3) save this as an image file (jpg or bmp)
4) reference this picture in the access application and print it with the report.


So the problems are:
1) when i take a screenshot, how do i save it as a file,
2) how do i just get the area of the graph and remove all extra space. (usually all the other space is white as background)

View 6 Replies View Related

Forms :: Change Button Color After Data Change

Apr 5, 2014

I am trying to change the button color on a subform if a related form data changes.Main form is products with a continuous subform with serial numbers of products i.e, serial number, location, price and a button to add addtional issues if there are any for this particular serial number (this will open up another form related to the serial number so I can add an issues if there are any).The reason I would like the button to be a different color is so I can quickly see if there are any additional notes been added to the serial number. Just in case you may ask why not add the field to the continuos form is that the issues and be quite lengthy and there may be lots of serial numbers on the form

2346 location warehouse price 29.99 (button - green)
2347 location shop price 29.99 (button - red)

View 1 Replies View Related

Auto-insert And Auto-update Help

Sep 1, 2005

Hi all!
I was wondering if you guys can help me out with this one:

I would like to have data auto-inserted from a particular colum in table 'x' in to a defined column in table 'y'. similary, I'd like to achieve auto-updation of this data as well as deletion. Can anyone please provide some guidelines?

A little more detail :

I have a column "Client ID" in the table client_personal_info, the rows of which I'd like to have updated in the "Client ID" column in the client_business_detail table.

So if say, ClientID_1 is a row that has been added by the user, I'd like to have it auto-inserted in the client ID column in the client_business_detail table

thanks in advance for your help

View 5 Replies View Related

Modules & VBA :: Name Auto-Correct Off But Auto Changes Appear

May 22, 2014

Access 2010 keeps changing the Capitalization of objects when I don't want it to.

For example "Cancel" becomes "cancel". Later it will be changed back to "Cancel".

There is also a table with a field "FULLNAME". Several Queries build a field "FullName". As a result FullName, even in places like Application. CodeProject.FullName get changed to Application.CodeProject.FULLNAME.

(Track Name AutoCorrect is off. ) It is especially irritating because I export the code to text files and check it into source control. Sometimes dozens, or even hundreds, of files will show up as changed because Access did it's rename thing.

View 3 Replies View Related

Change One Form Causing Change Other

Jul 2, 2005

I have not done much work in later version of Access. Now I found if I change a design in one form and similar forms (names are different) which are linked to the same tables got changed as well without openning them up and making changes. Is this something new with Access 2003?

Thank you very much for help.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved