Back color in continuous subform

schniggeldorf

Registered User.
Local time
Today, 15:03
Joined
Jan 7, 2013
Messages
22
Hi:

I have a form with a continuous subform attached. Everything works fine, except that when the form opens, Access automatically gives the focus to the first record in the subform.

The problem is that when the first record gets the focus, its background turns white, which is difficult to read. Is there a way to set the background color so that even if a user clicks a control, it's formatting does not change? I tried locking the control, but that didn't help. I changed the back color in the subform itself, which gets the back color where I want it, but only until the user clicks the field, or access give it the focus automatically.

This form is informational only, so it's entirely OK if the user can't click on any controls except the navigation buttons at the bottom of the screen.

Thanks.
 
You may disable the sub-form to prevent it from getting focus ON.

  1. Open the main form with the sub-form in design view.
  2. Click on the border of the sub-form to select it.
  3. Press F4 to display the Property Sheet.
  4. Find the Enabled Property on the Property Sheet and set it's value to No.
  5. Check the Tab Index Property value and if it is 0 then change it to some other value.
  6. Save and close the Form.
  7. Open it in normal view and check.
 
Thank you. Your solution prevented the subform from getting the focus, but then I simply had the same problem on a different control when the form opened with the focus elsewhere.

However, your post gave me an idea that worked. I created a new text box in the same detail area as the subform, changed its properties so that its text color and back color both matched the form background, then set it first in the tab order. Now the form opens to that empty box, and I get the results I wanted.
 

Users who are viewing this thread

Back
Top Bottom