Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

controlling check boxes with a checkbox 1

Status
Not open for further replies.

kpryan

Technical User
Aug 24, 2005
282
US
Hi

Would appreciate some help with this please.
I have a continuous form in which I use a check box via conditional formating to change the background of text boxes.
This highlights the record so that the user can see that this record has been edited.
I would like to be able to reset all the records that have been highlighted back to their original state at the same time by using another check box.

Many thanks,

KP


 
What line have you used in conditional formatting for highlighting?
 
Howdy kpryan . . .

Perhaps this ([blue]you![/blue] substitute proper names in [purple]purple[/purple]):
Code:
[blue]   Dim hldID As Long, SQL As String
   
   hldID = Me![[purple][B][I]PrimaryKeyName[/I][/B][/purple]]
   
   SQL = "UPDATE [[purple][B][I]TableName[/I][/B][/purple]] " & _
         "SET [[purple][B][I]CheckboxName[/I][/B][/purple]] = False;"
   CurrentDb.Execute SQL, dbFailOnError
   
   Me.Requery
   Me.Recordset.FindFirst "[[purple][B][I]PrimaryKeyName[/I][/B][/purple]] = " & hldID[/blue]
Note: the code assumes [purple]PrimaryKeyName[/purple] is numeric. If text, changes have to be made accordingly.

[blue]Your Thoughts? . . .[/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Hi The Aceman1,
You did well!. Many thanks for your help.
Its works well.

By the way where do you get all this time to answer all these queries?
 
kpryan . . .

I went to be early . . . So I'm up early this mourning! [thumbsup2]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top