General information
Category:
Forms & Form designer
Title:
Grid Record Source Problem
I have a form that accepts a parameter that is used in a select sql statement that in turn loads a grid. ie:
Form Init:
PARAMETERS pcGuestNumber
LOCAL lmAlias
lmAlias = alias()
this.grid1.recordsource = ''
select * from bills;
where gnum = &pcGuestNumber;
order by gnum into cursor billcurs
this.grid1.recordsource = 'billcurs'
if !empty(lmAlias)
select &lmAlias
endif
The error is "Cannot find variable pcGuestNumber" but if I comment out
the line that sets the recordsource of the grid, there is no error and the cursor is available just like it should be. gnum is a regular index, not unique. The recordsourcetype is set to alias. Do I have to index the cursor after the query? It seems to me the cursor should already be ordered and should not require an index to populate the grid? I've run into this before but I still don't understand this error.
Eric K.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only