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

Prevent changes to First record on subform

Status
Not open for further replies.

lizray

Programmer
May 14, 2008
126
AU
I Open a subform and do not want users to change the first record. On the "Current" event I have the following:
If Me.recordset.Bof=true then
me.allowedits=false
else
me.allowedits = true
End if
But it doesnt do anything...Any Ideas ?
 
How are ya lizray . . .

Try:
Code:
[blue]   Me.AllowEdits = Not (Me.CurrentRecord = 1)[/blue]
[blue]Your Thoughts? . . .[/blue]

BTW: Welcome to [blue]Tek-Tips![/blue] [thumbsup2] Do have a look at one of the links at the bottom of my post. The links will help you [blue]ask better questions[/blue], get [blue]quick responses[/blue], [blue]better answers[/blue], and insite into [blue]etiquette[/blue] here in the forums. Again . . . Welcome to [blue]Tek-Tips![/blue] [thumbsup2] [blue]Its Worthy Reading![/blue]

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Thanks once again It does the job perfectly...you really are the Aceman
 
lizray . . .

Don't know why I used [blue]Not[/blue] in the code. You can get rid of it with:
Code:
[blue]   Me.AllowEdits = (Me.CurrentRecord <> 1)[/blue]

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top