Hi All, I am trying to write a little If..Then statement that first checks if a table is open, then runs a query on the table. The problem I am having is when no records are selected. What is the syntax for saying something along the lines of;
If No records selected then resume next --- or---- continue If IsTableOpen("Street_City") Then Select * from Street_City where Len(Primary) > 20 into Selection IF NO SELECTION THEN?????? ELSE browse * from Selection Note "The Primary Name is more than 20 Characters" + chr$(13) + chr$(13) + "Please Use a New Primary" gsOpenTab = "Street_city" end if Exit Sub I am just running a query to alert the user if the data in a column is not in the correct format. If nothing is selected how can I just continue with the program?? TIA Steve. ---------------------------------------------------------------------------- This communication (including all attachments) is intended solely for the use of the person or persons to whom it is addressed and should be treated as a confidential xwave communication. If you are not the intended recipient, any use, distribution, printing, or copying of this email is strictly prohibited. If you received this email in error, please immediately delete it from your system and notify the originator. Your cooperation is appreciated.