General :: Highlight Subform Textbox Border Color On Focus

Nov 19, 2014

I am trying to highligh a subform textbox a yellow color on focus. However it is highlighting every textbox in that field as it is a continuous form therefore they are all named ThisCount.

Is there a way to highlight just the specific textbox that I am in. I have tried.

Code:
Me.ThisCount.BorderColor =RGB(255, 215, 0) 'gold
Me.ThisCount.BorderWidth =3

and tried

Code:
Dim ctlCurrentControl As Control
Dim strControlName As String
Set ctlCurrentControl = Screen.ActiveControl
strControlName = ctlCurrentControl.Name
Set ctlCurrentControl = Screen.ActiveControl

ctlCurrentControl.BorderColor = RGB(255, 215, 0) 'gold
ctlCurrentControl.BorderWidth = 3

View Replies


ADVERTISEMENT

Forms :: Change Border Color Of Textboxes When They Have Focus

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

Forms :: Label Border Color Incorrect

Jan 9, 2014

Using Access 2010. I have a form on which I've placed a simple label. I try to set the label border color to black but it shows grey. I can set the border color to #000000 and it's grey. I set it to #000001 and it shows black as expected.

I'm thinking it has something to do with the themes, but shouldn't an exact color code show as expected? As a new member (<10 posts) I can't post an actual link, but here's the text of the location: [URL] ....

View 2 Replies View Related

Modules & VBA :: Change Color Of Border Button On Mouseover

Oct 23, 2014

I would like to change color of border button on mouseover event. How it to do?

View 4 Replies View Related

General :: Date Field - Highlight Future Date In Different Color

Mar 25, 2014

In a date field is it possible for a date that is in the future to be hi-lighted in a different colour.

E.g. todays date is 25/03/14

So anything with todays date or previous would stay in black

24/03/14
25/03/14

but anything from 26/03/14 forward would be in red

26/03/14

Then will change to black when the 26th comes.

View 3 Replies View Related

General :: Get Value Combobox / Textbox That Does Not Have Focus

Sep 21, 2012

I am trying to get the value of a combobox after selecting an "OK" button but get "You can't reference a property or method for a control unless the control has the focus." Most would probably say use .Value but when I press "OK" I am prompted for a value, or as in another case get Null.I tried setting the focus prior to the violating line of code, but no go.

Example:

Code:
Private Sub viewByRegionOKButton_Click()
DoCmd.OpenReport "byRegionReport", acViewPreview, , "RegionName = '" & regionComboBox.Text & "'"
End Sub

View 4 Replies View Related

General :: Highlight The Current Record In The Subform?

Sep 23, 2013

I have synchronized a form with a subform with the following code:

Private Sub YourField_DoubleClick() 'this code is behind the subform
Dim rs As Object
Dim strLinkValue As String 'value in link field of the subform
strLinkValue = Me![NameOfLinkFieldOnSubform].Value
Set rs = Forms!YourMainForm.Recordset.Clone
rs.FindFirst "[NameOfLinkFieldOnMainForm] = '" & strLinkValue & "'"
Forms!YourMainForm.Bookmark = rs.Bookmark
End Sub

Every thing works fine but now I would like that the row in subform remains selected in the subform when the user doubkeclicks the record in the subform.Now after doublecliking the subform highlight the first row.

View 4 Replies View Related

Form Focus Highlight NOT

Jul 7, 2005

How do I turn off the highlight feature when a control on a form obtains focus?
Fen

View 2 Replies View Related

Reports :: Export Report Without Highlight Color

May 5, 2015

I am exporting a report from access 2010 as PDF to email and the email attachment is coming highlighted. I need it to be white like the report when seen on screen with alternate rows to NO. if I export it to PDF and view it from within access it comes perfect, but when exported to an email, its coming shaded.

View 1 Replies View Related

General :: Search Unbound Textbox And Populate Subform

Jun 14, 2012

I have a form with a textbox which when users enter a unique number(barcode) I want to run a query which pics up the barcode number, checks against the product id and fills the subform with the name of the product and price.

The basic details of the product table is like:

product id (Autonumber)
prdoduct name (text)
price
barcodeId (number)

The subform where i want the result to go is the order details fields product name and price.

I am trying to figure out how to do this but my mind keeps going blank, its been a long while since i used ms access.

View 7 Replies View Related

Forms :: Navigation In Textbox - Set Focus?

Dec 8, 2014

In a form, I go to a textbox with setfocus. The whole text is selected then. But how can I place the cursor after the existing text, so that I can begin writing immediately?

View 3 Replies View Related

Forms :: No Focus For Unbound TextBox In Continuous Form

Oct 27, 2014

I have unbound TextBox in continuous form and I would like that it never get focus. In property I specified Enabled=No and Locked=Yes. But it doesn't work.

View 8 Replies View Related

Textbox Font Color Dependent On Check Box

Oct 25, 2004

i have a report which i need to make certain results displayed in Red, if there is a check in the box.

example:

my report is called OEEModel
on the form i have a chkbox - called "FailureModeInPlace"
i also have 2 text boxes called "EventCode" and "CodeDescription"

what i want to do is for each record that is displayed with a chkbox ticked that the font in the two boxes turn red and bold...

can this be done please if so...how

cheers

Andy

View 1 Replies View Related

Forms :: Textbox Background Color Change Dependent On Value

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

Highlight Row On Cont. SubForm With Mouse Move Evemt

May 18, 2005

Using MS Access2003

Does anybody know of a way that I can highlight a row or change colours of all the text fields on a continuous subform when the mouse MOVES over a particular row.

Conditional Formatting seems the way to go and I've also tried the 'Stephan Lebans' method but that seems to require a 'row number' stored in a table in order for it to work, which is not very practical.

Many Thanks

View 2 Replies View Related

Modules & VBA :: Highlight Rows In A Subform Datasheet Table

Jan 25, 2015

I have a main form users enter info into then submit, which adds it to the table being displayed in the subform...

One of the options is a "Urgent" tick box, if they tick this box, once it has submitted to the table, i need that row to highlight red...

View 3 Replies View Related

Modules & VBA :: Highlight Entire Record In Subform As List Box?

Aug 31, 2013

I would like continuous subform as a list box in my file. Now when click fields on my form the entire record will not be highlighted. In the sample I have found from the net when click on each field in the form entire row will be highlighted. So I try to using function in the sample for my own but it does not work and when I click on each field just that field in 1 second will be highlighted and entire row will not be highlighted.

Private Sub P_ForceHighLight()
On Error Resume Next
Dim ct As Control, ct1 As Control
DoCmd.Echo False Set ct1 = ActiveControl
For Each ct In Me.Detail.Controls ct.SetFocus

[Code] ....

View 1 Replies View Related

Forms :: Highlight Unbound Subform Record That Matches Other Subform Record

Jan 22, 2014

I have two unbound unlinked subforms residing on a 3rd unbound main form. When I enter the current record on Subform1 I would like the matching record(s) on Subform2 to be highlighted or otherwise formatted. I can get this to work for only the first record on subform2 due to the way I have my code setup on Subform1:

Code:
Private Sub Accounting_Unit_Enter()
'find where AUs match. only works for first Subform2 record
If Me.[Accounting Unit] = Forms!MainForm.[Subform2]!AccountingUnit Then
msgbox "Match"
End If
End Sub

My thought was that I needed to reference the Recordset of Subform2 and search for all AccountingUnits that match the current AccountingUnit of Subform1,

View 6 Replies View Related

Forms :: Update Unbound Textbox In Main Form From Subform Textbox Afterupdate

Apr 17, 2015

How to update unbound textbox on main form from unbound textbox in subform afterupdate.

that is when amount paid is updated it automatically updates total paid, balance etc.

View 2 Replies View Related

Forms :: Change Textbox Color On Form In Access 2013 For Dyslexic User

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

General :: Set Up Conditional Format To Highlight Any Dates Within January Red

Jun 17, 2015

I have a report and i'm trying to set up the conditional format to highlight any dates within January red.

View 1 Replies View Related

Set Focus To A Sub-sub-subform

Jan 2, 2007

I have 4 nested forms:
DataEntryMaster
DataEntryMainSub (subform on DataEntryMaster)
DataEntrySub2 (subform on DataEntryMainSub)
DataEntrySub3(subform on DataEntrySub2)

In the AfterUpdate even of DataEntrySub2, I have code that checks to make sure the field on DataEntrySub3 (it has only one field) has been filled in. If not, I want to set the focus to DataEntrySub3.

The code in the DataEntrySub2 afterupdate event:
if isnull(me!dataentrysub3.productbarcode then
msgbox "You must enter a product barcode!"
forms!dataentrymaster!dataentrymainsubform!setfocu s
forms!dataentrymaster!dataentrymainsubform!dataent rysub2.setfocus
forms!dataentrymaster!dataentrymainsubform!dataent rysub2!dataentrysub3.setfocus
end if

I've used this most-wordy syntax because I couldn't get the shorter syntax (eg, me.dataentrysub3.setfocus) to work at all. However, this STILL doesn't work.

What's really puzzling is that if I run those exact same 3 setfocus statements from the immediate pane, they work fine. But in the afterupdate event, my focus always ends up on a control in dataentrysub2.

Any ideas???

View 1 Replies View Related

Subform Won't Surrender Focus

Mar 9, 2005

Well, the title says it all really. After I click into the subform and type something in a text box, the focus will not return to the parent form, via mouse or tab. I can't even switch the form back into design view, it appears to be totally locked. Has anyone run into this before?

View 4 Replies View Related

Set Focus To Subform But Do Not Activate

Sep 28, 2006

i won't go into details except i am doing databases for cemeteries - very complicated
example
i have come across two people who have the same name, date of death, buried in the same grave on the same day but are not related and must have seperate records!!
my main table has 6 primary keys. [even then i have 2 duplicates who are not related]
anyway one of the problems is this
i have a main form with 2 subforms. the main form is unbounded. i need to copy information from 1 of 4 queries run by the main form [QBF] to one of the subforms. i don't know which query untill i view the data.
when i know which one, i press a command button which copies the information to one of the subforms. when i repeat the actions above instead on the new query data going into a new record on the subform it overwrites the existing data instead of pasting it into a new record.
i have tried setfocus command - this works only if i click on the subform and activate it [this defeats the object of the command as i might just as well click in a new record box on the subform].
in essence i do not need to activate this subform at all. i just need to check if a record exists and if it does goto a new record [again this works only if i physically click on the form]
any ideas how i can force the cursor to goto a new record without physically clicking on the subform??

thanks

View 6 Replies View Related

Forms :: Set Focus To A Subform

Mar 20, 2014

If i open a form with a sub form on can i open it so that the focus go directly to a control on a sub form.I have tried to do it with a macro on the on open event to go to control but it comes up that the control don't exists on the sub form.i am using access 2010.

View 6 Replies View Related

Validation Before Focus Enters Subform

Aug 25, 2004

When I click on my subform after entering some data in the primary form, I get this error message:

"The Microsoft Jet database engine can't find a record in the table <name> with key matching field(s) <name>. (Error 3101)"

This is because I have not filled in a ItemCode, a combobox, on the parent form and ItemCode is part of a one-to-many relationship that involves automatic filling in of other fields such as ItemDesc, UnitPrice, etc. How do I code the validation that handles such an error?

Thanks in advance,
Swee

View 4 Replies View Related







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