Could someone point me to my errors here? Am trying to add multiple records to a table via a button using xbasic. It calls an xdialog to get a Year value (xPlan_Yr) and then a Month value (xplan_Month).

Code:
if dialog_result = "OK" then
	var->glo_Year = vPlan_Yr
	dim tbl as p
	tbl = table.current()
	debug(1)
	select
	    case vPlan_Month = "January"
	    	tbl.enter_begin(.t.)
			tbl.ap_sortno = 1
			tbl.ap_month = "January"
			tbl.ap_year = vPlan_Yr
			tbl.enter_end(.t.)
	    	tbl.enter_begin(.t.)
			tbl.ap_sortno = 2
			tbl.ap_month = "February"
 			tbl.ap_year = vPlan_Yr
			tbl.enter_end(.t.)    [COLOR="Red"]<< error comes here[/COLOR]
	end select
end if
Am trying to load all twelve months, but only using 2 for now because I keep getting the attached error on the second tbl.enter_end(t). Can't find what error 8003 is. The reason for getting the month is this determines the first month in the clients fiscal year for record keeping. There may be a better way to do this, but am trying to replicate an Excel program where it lists the months in order starting with the one chosen. So am showing it in a Browse.
Any help greatly appreciated. Thanks.
Ernie