dbTalk Databases Forums  

Previous record for formatting

comp.databases.ms-access comp.databases.ms-access


Discuss Previous record for formatting in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ray
 
Posts: n/a

Default Previous record for formatting - 08-05-2003 , 03:04 PM






I would like to be able to refer to the previous entry on a continuous
form so that I can conditionally format the new entry if needed. E.g.

Date Brix

1/8/2003 15
2/8/2003 16
3/8/2003 14

If the Brix "14" is less than the previous entry of "16" then I would
like to be able to conditionally format that entry. Is there a way of
referring to the previous entry?

TIA - ray

Reply With Quote
  #2  
Old   
Rich Protzel
 
Posts: n/a

Default Re: Previous record for formatting - 08-05-2003 , 03:53 PM






My esp battery is real low right now, but I will it a whirl. Do you
want to update your data during data entry or after the data has already
been entered and it is a QA process?

Either way, a continuous form is not the place to do it. If you want to
edit something during data entry you could place some code in the Brix
field in the Befor Update event, something like this:

Dim RS As Recordset
Set RS = Me.RecordsetClone 'if form is based on same table
RS.MoveLast
If RS!Brix > Brix Then
Do Something
End If

Ideally, in a data entry form, I usually create all the fields as
unbound, means not based on a table. Once all the data has been entered
into the form, and all conditions have been met, I present a Submit
button. But, that's just how I do it.

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Reply With Quote
Reply




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 On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.