General information
Category:
Coding, syntax & commands
>>>>I'm using a command button to add a record to file, being diplayed in a grid. On completing the entry, a grid.refresh() is issued but the grid is not being refresh properly. I just can't figure out why ?
>>>>Thanks
>>>>Sonali
>>>
>>>You probably need to reset focus to grid temporarily:
>>>Thisform.grid1.setfocus
>>>Thisform.grid1.refresh
>>>Thisform.Controlnext.setfocus
>>
>>I would think of this as a rather round about method. Does one have to always set the focus to the grid for it to refresh properly ?
>
>Not necessarily. For example, I used to have all grid resetting code in custom method 'ResetGrid' (it mostly resetting RecordSource/Column.ControlSource) and call it when it's necessary.
Actually I have grid display child records. The user clicks on a command button to make a new entry, this append a child record ( the field linking child & parent is set ) and set focus to a series of text boxes where the user actually enters the data. I find that after 2/3 entries the value don't display in the grid ( after each text box I'm refreshing the grid ). In this case do I have to set focus to the grid and then move to the next text box all the time ?
Previous
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