Problem with Auto update a field

HaCcKeR

New Member
Joined
Aug 3, 2011
Messages
5
hi folks ..... i have a problem...... got a field that when you click a checkbox it updates the date in another field.... that works no problem.

used:
If Me.PrintSR1 = True Then
Me.SR_1 = Date
End If

but i have created a select all buttom that works great with this code:

Private Sub tglYesNo_Click()
Dim rs As DAO.Recordset
Set rs = Forms![Search Results]![test subform2].Form.RecordsetClone
Do While Not rs.EOF
rs.Edit
rs!PrintSR1 = True
rs.Update
rs.MoveNext
Loop
Set rs = Nothing
End Sub

the problem is when you click select all it will not auto input the date

any ideas!!!
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Change the actual button/checkbox not the recordset.
 
Upvote 0
can you tell me more !!!!!!!!


ive tried putting it before update after update when the kettle boils everything tried it on the button
 
Upvote 0
Thank you thank you done it ...... made a coffee re thinked it and pu this line in the code:
Private Sub tglYesNo_Click()
Dim rs As DAO.Recordset
Set rs = Forms![Search Results 90 days]![Subform90 days].Form.RecordsetClone
Do While Not rs.EOF
rs.Edit
rs!Printsr3 = True
rs![SR 1] = Date
rs.Update
rs.MoveNext
Loop
Set rs = Nothing
End Sub

and what ya know it worked thank you
 
Upvote 0

Forum statistics

Threads
1,224,527
Messages
6,179,348
Members
452,907
Latest member
Roland Deschain

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top