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 Replies
ADVERTISEMENT
May 10, 2013
Is it possible that once the command button "Send Cost Request" in red is pressed it will change to green?
View 3 Replies
View Related
Aug 1, 2013
I have a form in datasheet with the fields "Date In" and "Date out" among other.
I want to be able to Change the backcolour of the "Date In" to red, yellow, or green depending on the length of time elapsed between current date and date in. This works fine on the conditional formatting, but now I only want to apply this formatting IF the "Date Out" is empty.
Access 2007.
View 3 Replies
View Related
Mar 15, 2014
How do I conditionally change the Back Color and Alternate Back Color based on the value of notes.FollowUpDate? I have a continuous form using the following code:
Code:
Private Sub b_all_past_Click()
Me.resultsFrame.SourceObject = "FollowUp_bystaff"
Me.resultsFrame.Form.RecordSource = "SELECT * From notes WHERE (((Notes.FollowUpDate) < Date()+1) And ((Notes.followup_person_id) = GetCurrentUserId()))ORDER BY notes.priority,(notes.FollowUpDate) DESC;" '
End Sub
View 1 Replies
View Related
Jul 13, 2015
I am using a continuous form and would like my users to be able to change a field background color to a light red by double-clicking. The user would also be able to change it back to white by double-clicking again.
The code I am using (below) changes the field background color for all records. I need my code to only change the field color of the current record and cannot seem to find how to do that. The field name is [System_CurrentStatus].
Private Sub System_CurrentStatus_DblClick(Cancel As Integer)
If Me.System_CurrentStatus.Backcolor = vbWhite Then
Me.System_CurrentStatus.Backcolor = RGB(234, 154, 160)
ElseIf Me.System_CurrentStatus.Backcolor = RGB(234, 154, 160) Then
Me.System_CurrentStatus.Backcolor = vbwhite
End If
End Sub
View 13 Replies
View Related
Jan 11, 2005
Is there a way to change the back color of an active field in a form? Meaning, when I tab through my form and the field I tab to becomes active, the field turns white. This poses a problem because my form back color is black and my field text is white. When the field is active, I can't see the value in the field due to the back color defaulting to white. Does this make sense? Is there a way to change it?
View 7 Replies
View Related
Apr 30, 2006
I searched around but i couldnt really find or atleast understand how to do what i want to do. I want upon the user clicking on a checkbox for the background of the form to change to a set color?
View 8 Replies
View Related
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
Aug 9, 2014
I'm using Access 2010
What I want to be able to do is to assign a back colour to a control from VBA. There are many colours and what I thought would be an easy process was to choose a suitable colour to be assigned using the colour picker for a control, note the hex number then in my vba code would be
if... then me.mycontrol.backcolor=&HF0AD34
This compiles OK, but produces a completely different colour - I'm expecting an orange colour but getting blue and in another example a pale blue is coming out a brown.
Research indicates adding an ampersand to the end changes the value from integer to long but if I type
if... then me.mycontrol.backcolor=&HF0AD34&
The second ampersand disappears. In the immediate window
?&HF0AD34
?&HF0AD34&
?Val("&HF0AD34")
?clng("&HF0AD34")
?Val("&HF0AD34&")
?clng("&HF0AD34&")
All produce the same value of 15772980, which if I copy back to the control backcolour property produces the blue colour and not the required orange - which if i debug.print me.mycontrol.backcolor give me 3452400 - the correct number for orange.
The problem seems to be converting the hex number to a long.
Also how to modify the properties window to show the decimal value rather than the hex value, but can't see anywhere to do this.
View 14 Replies
View Related
Jul 13, 2014
how can i make a folder from my windows 7 opens when i click on a image?
View 11 Replies
View Related
Oct 29, 2014
I have continuous form in Access 2010 and I would like when user will click on record, the image, for instance, imgTest become visible for that record. But for other records the image not visible. How it to do?
View 6 Replies
View Related
Oct 18, 2013
I have a subform that is purely to display information (no edits will be made on it). The subform has a special color on it (company color) that I can not deviate from. My problem is the first record in the subform (displayed as a continuous form) gets the focus. The font is white and standard access has a white background. My end goal would be to elimnate the focus for any record in the subform (if it is possible). I know that I could change the color with conditional formatting but the colors in conditional formatting do not match the company color.
View 4 Replies
View Related
Apr 21, 2013
I have several forms that each has a dozen or more checkboxes, true/false. I want to be able to change the background color of the label of each checkbox depending on if the checkbox is true or false. I have used the following code which works great:
If Me.A = True Then
Me.lblA.BackColor = vbYellow
Me.lblA.BackStyle = 1
Me.lblA.ForeColor = vbRed
Else
Me.lblA.BackColor = vbWhite
Me.lblA.ForeColor = vbBlack
End If
Me.A refers to T/F checkbox A and Me.lblA refers to its label. This is repeated for each of the checkbox controls. If the control is [B], then its label is lblB. I have used this in the form OnCurrent event and the checkbox control OnUpdate event. I was wondering if I could use the tag property to this, saving me writing countless lines of code and having the OnCurrent event of each of the forms so long and cumbersome. And I do know that I can use conditional formatting to do this, but I would prefer not to use that method. Is there any way to do this using the tag property and not so many lines of code?
View 7 Replies
View Related
Jun 26, 2013
I am attempting to create an expression that will change the font to red if it is an overdue date. It will be on a form with the records showing.
My datebase is for entering, changing, and searching for information dealing with orientation dates, contacts, and associations. My data sheet holds the company name, employee name, date of orientation, due date (orientations are completed annually), contact employee, and status. I would like the date, when opening the form, to show red if it is past due. how to create an expresion to return the status as "Current" or "Overdue", as I am still unsure which method I want to use.
View 1 Replies
View Related
May 3, 2013
no problem about setting a different border color for a single textbox (or combobox or listbox) which has focus. How about to change, with a small and fast VBA code avoiding to write code for each textbox, the border color (ora other textbox properties) for a many controls in a form?
I tried using 'For each ctrl in Form....', but I got only bad results. All my control are within differente pages in TAB control.
View 14 Replies
View Related
Oct 3, 2013
I have a question related to a textbox on a form.
In my table (tbl_data) I have a field named Rating. This can be anything from 1 - 10.
On my form (frm_input) I have a textbox (created using the wizard so at the moment I'll call it txt_Rating).
What I would like to know how to do is:
If the value in the textbox is 0-5 leave the background colour of the textbox white with black font.
If the value in the textbox is 6-7 turn the background colour pale yellow with black font.
If the value in the textbox is greater than 7.1 turn the background colour Red with white font.
View 3 Replies
View Related
Mar 24, 2014
I have a listbox and whenever I clicked on a row it will highlight black background and white font color. How can I disable this or change the formatting?
View 2 Replies
View Related
Mar 28, 2013
I would like to change the Font and background color based on dates.
-I have a text box (Training Event) on a form populated from a field (Training Dates) in a query.
- I need the font and/or the background in that text box to change to red when the date is 12 month past, yellow 11 months past, white 10 months past and green for 9 months past.
View 3 Replies
View Related
May 1, 2014
I have a continuous form based on a orders table and a details sub form.I list all the records in a continuos form in date of order.i need to change the colour of a single record based on the condition of a tick box on the original orders form
View 1 Replies
View Related
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
Mar 13, 2013
I would like to be able to change font color and appearance while entering data into a form (example: italicize a word). Is there any way to activate the font format while in a form?
View 2 Replies
View Related
Apr 24, 2014
I have an unbound listbox on a form which displays a list of staff, both past and present, based on an SQL query.
I want to be able to differentiate between current and past staff using different colors, i.e. Black text for current employees and red for employees who have left, based on a field (True/False) in the original staff table.
View 4 Replies
View Related
Jul 28, 2014
in a continuous form i want to click on one record and have the one field change the background colour to highlight it. When I use the code: Field. BackColor = vbYellow it changes the background on all the records. Is there a code to say only for the record with focus?
View 1 Replies
View Related
Apr 29, 2014
I have a new staff member in my office that has informed me that she has a degree of dyslexia. To assist her I've trialled changing the textboxes on one form in my Access 2013 application to a light pink color & this has instantly worked for her to read/input text.
Is there a way to automatically change each textbox to light pink on every form in my application on startup based on user login (say using an IIF statement in the OnLoad event of the startup form).
View 4 Replies
View Related
Oct 21, 2013
I have an unbound form with a combobox which needs to be validated before the control is updated.In the Before Update event I check that the value is valid and need to reset the value back to the previous value if not valid and then change focus to another control.I thought that the following code would work but the selected value remains in the control and I cannot move the focus to another control.
Code:
Private Sub cboYears_BeforeUpdate(Cancel As Integer)
Dim dteNewDate As Date
dteNewDate = DateSerial(Val(Me.cboYears), Month(Me.txtCalendarHeading), 1)
[code]....
View 7 Replies
View Related
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