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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Advice Needed: CheckBox control/field not updating last selected 2

Status
Not open for further replies.

rafe

Technical User
Aug 18, 2000
194
0
0
US
I've got this limping along but you may know a better way.

Senario:
I have a continuous form with only one active control in the detail section, a CheckBox to select documents for further processing. Access 2K.

Problem:
The last record selected via a CheckBox control click is not updated until I move off of the selected record or I requery the whole form.

Here are a few things that I've tried.
1) Sub MyCheckBox_AfterUpdate()
Me.AnotherControlInHeaderSection.SetFocus
End Sub
2) Sub MyCheckBox_AfterUpdate()
Me.DummyControlInDetailSection.SetFocus
End Sub
3) Moving to anther record programmatically with DoCmd.GotoRecord... this works except if there is only one record in the list.
4) Me.Requery... This actually works but there's got to be a more direct way.

If you've got some ideas about how to do it better or why Access can't do it better, chime in.

rafe
 
Try saving the record.

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70


DougP, MCP
dposton@universal1.com

Ask me how Bar-codes can help you be more productive.
 
Like a charm!

Thank you!
 
Earlier posts were helpful (as in the need to save record)

for Access97 and 2000 use

RunCommand acCmdSaveRecord

instead

Ed
 
Ed,

I like the change. A more compact notation though functionally the same. I've made the replacement.

'DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

DoCmd.RunCommand acCmdSaveRecord

Thank you both.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top