Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / February 2008

Tip: Looking for answers? Try searching our database.

AfterUpdate

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
James Frater - 31 Jan 2008 15:46 GMT
Hello Chaps,

In the AfterUpdate code I had the detail back colour change if a check box
(tbc) = True. However if I tick the box now it turns the back colour of every
form irrespective if that record is ticked tbc or not!

Any help on solving this would be great.

JAMES

Private Sub tbc_afterupdate()

If Me.tbc = True Then
Me.Section(0).BackColor = 65535
Else
Me.Section(0).BackColor = 16777215
End If
End Sub
Arvin Meyer [MVP] - 31 Jan 2008 17:15 GMT
If you are using a continuous form, that code won't work. The good news is
that you can use Conditional Formatting to make it work. In Design View,
select the combo box and from the menu, choose Format >>> Conditional
Formatting, then set your conditions.
Signature

Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

> Hello Chaps,
>
[quoted text clipped - 15 lines]
> End If
> End Sub
James Frater - 05 Feb 2008 15:29 GMT
Arvin,

I'm using a good old fashioned single form, and apologies for not making it
clearer it's a yes/no box rather than a combo box that I'm using, so
conditional formatting doesn't work.

I've tried setting the reverse conditions in the beforeupdate event but
still can't it to work.

Any futher suggestions would be most welcome.

Regards

JAMES

> If you are using a continuous form, that code won't work. The good news is
> that you can use Conditional Formatting to make it work. In Design View,
[quoted text clipped - 19 lines]
> > End If
> > End Sub
J_Goddard - 05 Feb 2008 15:41 GMT
Hi -

The True/Dalse check for tbc_ is only done if you make a change to the tbc_
checkbox by clicking on it.

Try putting your code in the On current event of the form as well, so that it
runs each time you move to a new record.

John

>Arvin,
>
[quoted text clipped - 16 lines]
>> > End If
>> > End Sub
James Frater - 05 Feb 2008 16:22 GMT
John,

It works!

Thanks for this most appreciated.

Regards

JAMES

> Hi -
>
[quoted text clipped - 26 lines]
> >> > End If
> >> > End Sub
Arvin Meyer [MVP] - 05 Feb 2008 16:16 GMT
Sure conditional formatting works. In Design View:

1. Select the textbox that you want the backcolor to change
2. Go to Format >>> Conditional Formatting
3. In the Condition 1 combo, change to read "Expression is"
4. Enter: [NameOfCheckbox]= -1
5. Pick the color in the fill condition.
6. Click OK
Signature

Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

> Arvin,
>
[quoted text clipped - 37 lines]
>> > End If
>> > End Sub
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.