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

keep from changing current record

Status
Not open for further replies.

illuzioner

Technical User
Dec 15, 2002
44
0
0
US
Hi,

Is there any way to disable record selection in the details section of a continuous form without turning its visibility off?

I want to prevent the user from changing the current record, but I still want to show the all the records (in the details section) and make the current record editable (in header).

I will do this in "Edit Mode" where the user shouldn't be able to change records and must press a button to get out of that mode.

If there's a better way to do this, I'm interested in that too.

Thanks for all answers,

Lou

 
This will lock all existing records in the detail section and will unlock a new record.

Sub Form_Current()
Dim ctr As Control
On Error Resume Next
For Each ctr In Me.Section(0)
ctr.Locked = Not NewRecord
Next
End Sub

Good luck,

Dan [pipe]
Daniel Vlas
Systems Consultant
 
Sorry, forgot the collection:

Sub Form_Current()
Dim ctr As Control
On Error Resume Next
For Each ctr In Me.Section(0).Controls
ctr.Locked = Not NewRecord
Next
End Sub
[pipe]
Daniel Vlas
Systems Consultant
 
Hi,

Thanks for answering. Unfortunately this only locks the controls -- which are already locked.

I'm trying to prevent the user from changing the current record to a different record -- not the values in the record, but changing which record is current.

thanks,

Lou
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top