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

Getting a compile error 1

Status
Not open for further replies.

beverlee

Instructor
Oct 8, 2002
61
US
I'm using the following piece of code and getting a compile error.

If Me.[LatestNeg]![latestnegtest] < Me.LatestPos![latestpostest] Then Me.BaselineNeg.Value = ""
ElseIf IsNull(Me.BaselineNeg) And Me.LatestNeg!latestnegtest > Me.LatestPos![latestpostest] Then
Me.BaselineNeg = Me.LatestNeg![latestnegtest]
End If

It's not liking the code right after 'And'. I need both of those conditions to be true in order for it to run.

Any help is greatly appreciated!
 
Correct syntax:
If Me.[LatestNeg]![latestnegtest] < Me.LatestPos![latestpostest] Then
Me.BaselineNeg.Value = ""
ElseIf IsNull(Me.BaselineNeg) And Me.LatestNeg!latestnegtest > Me.LatestPos![latestpostest] Then
Me.BaselineNeg = Me.LatestNeg![latestnegtest]
End If

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top