Highlight the required fields, or the control that has focus
Thank you for taking the time to report an issue.
What's wrong... Please write below.
Is there an easy way to either make the cursor thicker or highlight a box when it gains focus and de-highlight when it loses focus?
I.e. change txtBox backfill color on focus and change txtBox backfill color (original color of course) off focus.
What am I missing here? I thought that every time the user changes or enters a value in one of the fields on the report, that would be able to trigger a beforeupdate or afterupdate event.
Not the case. If the field is highlighted yellow and the user enters a value and then leaves the field it still stays yellow.
I am trying to avoid having to put the below code behind every one of the 15 required fields on this form.
You can set conditional formatting for a text box or a combo box control. You can change the formatting based on the control's own value, or you can use an expression to change the formatting based on the values contained in other fields or controls. On a form, you can use conditional formatting to disable a control, and you can cause the formatting of a control to change when the cursor is positioned in that control.
What do you want to do?:
*Apply conditional formatting to a control based on its own value
*Use an expression to apply conditional formatting to one or more controls
*Change the formatting of a control on a form that has the focus
*Remove conditional formatting from one or more controls
*Create alternating row colors on a report
I have 100s of Input Controls on my form (TextBox, ComboBox), now what I want is When the control receives Focus I want it's Back Color set to some color say 'Lemon Yellow' to highlight thecontrol & when it leaves focus set it to it's original.
Writing in Enter Event & Leave Event for every control is not quite a good idea.
So I want a trick to handle this with a single or two events.
I have a form where a customer can input data and there are several fields which are required (this requirement is set in the related table).
The Fields on the form that are required are named as follows: txtFirstName txtLastName
Instead of Access giving an error that a certain field is required I would just like to display a generic message of "All Bold Fields are Required." Ideally I would like toaccomplish this by just checking to see if a required field is missing rather than having to list and check each field individually in the form as I have been trying to do:
I am using Access 2010 and am trying to have a bit of VBA code retrieve the value in a form's current control (text box) regardless of which control has focus. For example the following code specifies the name of the control Invoice Number.
stFile = Me![InvoiceNumber]
How would I modify this to retrieve the data not knowing what control has focus
How do I set focus to the subform control from the navigation button OnEnter event?
Here is my structure:
frmMain --> NavigationSubform --> frmBarcodeEntry --> subfrmBarcodeEntry --> txtBarcodeString
where txtBarcodeString is the textbox control that I want to set focus for.
We were using a program that ran in access before where if we surrounded text with an Asterisk * it would automatically highlight it. Something like this would be ideal for what I want to do.
So if a user puts asterisks around a field in a record it will highlight it.
How can I possibly accomplish this?