Doug Lindauer
Programmer
I'm not having much luck trying to put a UDF expression into a grid column. I'm using VFP 9 on Win 7.
What I have is an application for a camp. The camp has multiple sessions during the summer. The session table is the one I'm displaying on the grid.
Each session can utilize camp cabins and those cabins are in a separate related table via a session ID. The various cabins have a max number of beds in them.
So in my Sessions grid I want to include a calculated column to show the max number of beds. A UDF sums up the beds in all the cabins that are associated with each session. So the calculated value in the text box control source is something like this: MAXBEDS(SESSIONID).
MAXBEDS() returns a number.
When I run the form, the grid goes a little wonky and instead of showing the number it shows the value of the first column in the grid! I can't seem to find any instructions about how to put an expression into a grid. I would have thought it would be straight forward. Silly me.
What I have is an application for a camp. The camp has multiple sessions during the summer. The session table is the one I'm displaying on the grid.
Each session can utilize camp cabins and those cabins are in a separate related table via a session ID. The various cabins have a max number of beds in them.
So in my Sessions grid I want to include a calculated column to show the max number of beds. A UDF sums up the beds in all the cabins that are associated with each session. So the calculated value in the text box control source is something like this: MAXBEDS(SESSIONID).
MAXBEDS() returns a number.
When I run the form, the grid goes a little wonky and instead of showing the number it shows the value of the first column in the grid! I can't seem to find any instructions about how to put an expression into a grid. I would have thought it would be straight forward. Silly me.