A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

memory of past record



 
 
Thread Tools Display Modes
  #1  
Old August 26th, 2004, 04:26 PM
tony wong
external usenet poster
 
Posts: n/a
Default memory of past record

i have the following code running. The 1st part (assignee) seems fine but
there may be problem with 2nd part(status)

when i search for record A, the code seems running fine (status = not
closed, allow me to edit, add & delete)
then i page down to a record B, the code seems running fine too (status =
closed, not allow me to edit, add & delete)
then i page up back to record A, the form goes wrong, (status = not closed,
NOT allow me to edit, add & delete)

What i miss in the code, thanks a lot for your help and anyone assisted me
before.

Tony


*************************************

If Forms!FrmApplicant!FrmOfficer!assignee assignperson Then
Me.AllowEdits = False
Me.AllowDeletions = False
Me.AllowAdditions = False

ElseIf Forms!FrmApplicant!Status = "Closed" Then
Me.AllowEdits = False
Me.AllowDeletions = False
Me.AllowAdditions = False

Else
Me.AllowEdits = True
Me.AllowDeletions = True
Me.AllowAdditions = True
End If


  #2  
Old August 26th, 2004, 04:30 PM
tony wong
external usenet poster
 
Posts: n/a
Default

This is the full codes.

*************************************
Private Sub Form_Current()

Dim assignperson As String
assignperson = CurrentUser()

If FrmOfficer!assignee assignperson Then
Me.AllowEdits = False
Me.AllowDeletions = False

ElseIf Status = "Closed" Then
Me.AllowEdits = False
Me.AllowDeletions = False

ElseIf Status = "Cancelled" Then
Me.AllowEdits = False
Me.AllowDeletions = False

Else
Me.AllowEdits = True
Me.AllowDeletions = True
End If

End Sub


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
combo box serving as record selector??? ABW Using Forms 0 August 17th, 2004 11:35 PM
Change and Save a Record sara Using Forms 0 July 17th, 2004 04:47 PM
How to get Current Record from the subform with the datasheet Tom Using Forms 1 June 18th, 2004 12:35 PM
Form Does Not Go To New Record Steve New Users 1 May 12th, 2004 03:15 AM
Avoid Creating A Duplicate Record Mark New Users 4 May 11th, 2004 01:52 AM


All times are GMT +1. The time now is 02:37 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.