G Guest Nov 23, 2005 #1 using code, how do check if the record u are current editing is a new record rather than editing an existing one, when in a form
using code, how do check if the record u are current editing is a new record rather than editing an existing one, when in a form
R Rick Brandt Nov 23, 2005 #2 Patrick said: using code, how do check if the record u are current editing is a new record rather than editing an existing one, when in a form Click to expand... If Me.NewRecord = True Then...
Patrick said: using code, how do check if the record u are current editing is a new record rather than editing an existing one, when in a form Click to expand... If Me.NewRecord = True Then...
R RobFMS Nov 24, 2005 #4 To expand a little more on Rick's solution, you can simply put: If Me.NewRecord Then ' do something here End If Because Me.NewRecord evalutes as boolean, it meets the syntax criteria of the If-Then statement: If <condition> Then End IF By removing the "=True" part, you are actually saving some time on processing. Just food for thought... Rob Mastrostefano -- FMS Professional Solutions Group http://www.fmsinc.com/consulting Software Tools for .NET, SQL Server, Visual Basic & Access http://www.fmsinc.com
To expand a little more on Rick's solution, you can simply put: If Me.NewRecord Then ' do something here End If Because Me.NewRecord evalutes as boolean, it meets the syntax criteria of the If-Then statement: If <condition> Then End IF By removing the "=True" part, you are actually saving some time on processing. Just food for thought... Rob Mastrostefano -- FMS Professional Solutions Group http://www.fmsinc.com/consulting Software Tools for .NET, SQL Server, Visual Basic & Access http://www.fmsinc.com