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

Expression to VB Code...

Status
Not open for further replies.

combs

Programmer
Apr 18, 2002
78
US
How do I change an Expression to VB Code? What I would like to do is change the following expression into something similar with VB...

Expression:
[blue]
=IIf([CurrentRecord]>(Count(*)),'New Record',('Record ' & [CurrentRecord] & ' of ' & Count(*)))
[/blue]

Actually, all I really care about is the first part of the expression where it tests to see if the current record is the last record. I don't care to display 'New Record' or 'Record X of X'

Any help would be greatly appreciated
 
Play with the NewRecord property of the Form object.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
or,

Dim rec as Recordset
rec = Me.RecordsetClone

rec.moveLast

If rec.Bookmark = Me.Bookmark Then
MsgBox "Brudda, you is on da last record!"
End If

or, Using the form's OnCurrent event, check for rec.EOF (end of file)property.

Good Luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top