<<

SET ERROR VARIABLE errvar
IF errvar <> 0 THEN
  ENTER USING trackeredit
ENDIF
>>
In this case you want an EDIT USING TrackerEdit after the SET VARIABLE command.

However, it's probably best to physically count the records first and then 
INSERT a blank row into the table, guaranteeing that EDIT USING will work.

These days, however, I almost always base my user interfaces on a variable form 
that displays records from the table in a Variable Lookup Listview (the most 
useful control in R:Base) and features menu options (using the form menu, group 
bar,  buttons, or some combination) to allow users to edit or enter items.  
This eliminates the no records problem, gives users free record sorting, and 
means that the user doesn't have a lock on the table until they actually want 
to edit or enter something.
--
Larry

Reply via email to