General information
Category:
Forms & Form designer
Title:
Grid and Requerying
Hi.
I am still grappling with a Grid problem and cannot find a resolution.
Scene is as follows:
1. I have set up a Grid on a search form which dispalys fields from a cursor based on a result set
2. RecordSource Type =Alias recordSource = ' ', ColumnCount = 4
3. In the Init of the grid, I have a method(SetColumns) which sets Column Sources,captions etc for each column
e.g. .caption=MyCaption .RowSource=sma_name .FontName = 'Courier New'
(I do it like this because each client needs different fileds..these are help on a paramter file)
4. On My Search button , I have the following:
ThisForm.MyGrid.RecordSource = ''
Select * from MySourceFile into Cursor Mycursor
ThisForm.MyGrid.RecordSource = MyCursor
What happens is, the fields in the Grid, are not as per Point 3 above, but it is just showing the first 3 fields from the file
(The Caption,Font,headers etc display correctly)
If I call my SetColumns methos after point 4 above, I just get the first record from the
result set displayed in EVERY row, but again with the incorrect columns.
I've spent weeks trying to sort this out and would reaaly appreciate any help
Regards,
Gerard
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