I've got a fairly simple form with a ComboBox on top with a grid below. The Combobox is tied to the master table and the grid holds the detail records. When I open the form, the relationship between the two work great. I can click on any record in the combo box and the appropriate records appear in the grid. I can edit records fine in the grid and it all works. But if I use the setfocus command with the grid, the relationship breaks and the dropdown no longer changes the values in the grid. I need really need setfocus to work. Any ideas?
Here is the code for the add form. This code works fine if I comment out thisform.grdTrays.setfocus. Any ideas? Thanks!
Here is the code for the add form. This code works fine if I comment out thisform.grdTrays.setfocus. Any ideas? Thanks!
Code:
IF NOT EMPTY(thisform.selectedprofile)
SELECT printertrays
APPEND BLANK
replace printertrays.profileid WITH printerprofiles.profileid
thisform.grdTrays.Refresh
[COLOR=#CC0000]thisform.grdTrays.SetFocus[/color]
SELECT printerprofiles
ELSE
MESSAGEBOX('You have to select a profile first.',64,'Select a Profile')
ENDIF