I have a form which is a continuous view form. Is there a way highlight the first field in the last record which is for new data? I want to draw the user’s attention to the bottom of the form so they can add new records as necessary.
I have a form which is a continuous view form. Is there a way highlight the first field in the last record which is for new data? I want to draw the user’s attention to the bottom of the form so they can add new records as necessary.
What is the data type of the field that you want to highlight and is it ever a null once the record is entered.
If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
Bob Fitzpatrick
It is a short text once I enter the new record. Before I enter the new information I assume it is null, but NEVER null after the record is entered since it is a required field.
Take a look at the attached db.
If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
Bob Fitzpatrick
This requires adding a field in table.
I am curious about displaying the default value of NonData textbox on new record line. I changed ForeColor to black and the value still does not show. Why?
I changed rule to: Expression is: [txt] Is Null
And now the default value of NonData shows. So I made this an UNBOUND textbox without a default value and deleted NonData field.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Might that be because both the background colour and the text colour are controlled by the conditional formatting rule.I am curious about displaying the default value of NonData textbox on new record line. I changed ForeColor to black and the value still does not show. Why?
If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
Bob Fitzpatrick
Okay, I see now that the CF selection controls don't actually display what is selected when rule is opened for edit, they show defaults which is most likely not what was set up and showing in the preview box. Just me crossing wires.
Could set each textbox and combobox with transparent background to get more solid color block. And control that has focus will show white.
Set focust to [txt] instead of ID. ID doesn't even need to show.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
I'm confused by some of the responses - probably am not interpreting them correctly. First, the name of the selected control for the rule to be edited does show beside the Show formatting rules for: combo. If it's not the one you want you can select the right one.
There is a 'control has focus' option so set the formatting for the desired control and then use something like
DoCmd.GoToRecord acActiveDataObject, , acNewRec
Me.NameOfYourControl.SetFocus
or no? I have no idea what OP wants to use as the trigger though.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.
Bob, Thanks for the suggestion. It works, but is too complicated. I have found a solution.
1. I set the conditional format of the background color first field to green when it has focus.
2 When the event form current I go to record new.
Thus I draws the users attention to add a new record. It is not perfect because anytime the user moves to any of the record's first fields it is highlighted.
Then I suppose you could delete/add format conditions based on whether or not you're on a new record when the GotFocus event fires. If not, turn it off (or delete). If yes, leave it (or create it). I have very little vba experience with CF and have been trying to figure out the Modify method but it's mostly Greek to me.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.
This seems to work
Code:Private Sub Last_Name_GotFocus() Dim fc As FormatCondition If Not Me.NewRecord Then Me.Last_Name.FormatConditions.Delete Else Set fc = Me.Last_Name.FormatConditions.Add(acFieldHasFocus) fc.BackColor = vbGreen End If Set fc = Nothing End Sub
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.
Why is it too complicated?Bob, Thanks for the suggestion. It works, but is too complicated. I have found a solution.
I'm happy to try to help further if I can.
If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
Bob Fitzpatrick