• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3761
  • Last Modified:

Microsoft Access 2010 subform formatting with datasheet view

I am creating an input form for a client and they want the subform to display highlighting if a record has one price different by x percent from another price. I want the subform to display multiple records at a time and the only way I have found to do that is with datasheet view. I have tried to change formats with VBA but it is not working.

Thanks!
0
pabrann
Asked:
pabrann
2 Solutions
 
Bill RossCommented:
Hi,

Suggest you use continuous forms and conditional formatting.  Use a query as the recordsource for the subform with the desired expression and use conditional formatting to change the color.

Here is a good MS article on the process:

http://office.microsoft.com/en-us/access-help/change-the-appearance-of-a-control-by-using-conditional-formatting-HA010208133.aspx

Regards,

Bill
0
 
pabrannPresidentAuthor Commented:
Hi Bill, thanks. Will this work on a subform?
0
 
Gustav BrockCIOCommented:
>  I have tried to change formats with VBA but it is not working.

That's because it is ignored in datasheetview.
You have to use conditional formatting in this case.

/gustav
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Bill RossCommented:
Hi,

Yes.  You can design the subform separately and the changes will be available in the main form when the subform is viewed.

Regards,

Bill
0
 
Helen FeddemaCommented:
See my Access Archon article on this topic:

http://www.helenfeddema.com/Files/accarch173.zip

and here is a screen shot:

Current Row back color
0
 
pabrannPresidentAuthor Commented:
Thank you very much. I was able to accomplish exactly what I desired with comments from Bill and Helen. Excellent!!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now