Ray, you can't have ANYTHING after the "THEN" or else VB assumes it's a SINGLE LINE command. For example, this is fine:
If X=A Then MsgBox "B"
But you can't say this:
IF X=A Then MsgBox "B" MsgBox "A" End If
You would have to say:
IF X=A Then MsgBox "B" MsgBox "A" End If
So it looks like VB is looking for the END OF STATEMENT because you've got a command after the THEN in your IF/THEN block. Just move that down to the next line and you'll be fine.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Microsoft Access 328.