msgbox problem

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
franco
Posts: 251
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Been thanked: 9 times

msgbox problem

Post by franco » Wed Apr 25, 2018 10:49 am

I am getting an odd error message and program crash.
I am in a grid which it`s table has a field QTY
I am checking a different table when saving grid and using msgbox

function grid
select table1
define grid
fields item qty description
on change savecell()
return

function savecell
select different table
if ! rlock()
msgbox('Can Not Get Lock') on line 1700
endif
select table1
return

my error is varible does not exist QTY
called from (getfiledata(2910)
called from (getdatagridcelldata(2889)
called from events(3060)
called from c_messagbox(0)
called from msgbox(153)
called from savecell(1700) (my last program line number)

I am getting this error in other parts of program also on msgbox()
Any thoughts ... Franco
Last edited by franco on Wed Apr 25, 2018 3:49 pm, edited 3 times in total.

User avatar
dragancesu
Posts: 546
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia
Has thanked: 13 times
Been thanked: 97 times

Post by dragancesu » Wed Apr 25, 2018 11:03 am

What is the QTY, variable or database field?

If the field is then <control>.QTY.Value

where <control> is like Browse, Grid, ...

franco
Posts: 251
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Been thanked: 9 times

Post by franco » Wed Apr 25, 2018 3:52 pm

found fix
before msgbox I changed back to grid table
function savecell
select different table
if ! rlock()
select table1
msgbox('Can Not Get Lock') on line 1700
endif
////////select table1
return
I will leave this post for others may have problem
Thanks Franco

Post Reply