>>>>Hi All:
>>>>
>>>>I have two combos on Page2 of a pageframe. They are populated (Labtests) in the Load method of the form using a select statement.
>>>>
>>>>In one of the pages, the user may enter a new code and test name (in text field) which are then inserted into the Labtests table. when this happens, I would like the two combos to contain a refreshed verision of the labtests table, i.e., the should include the newly inserted test. I have the code to insert the new code and name in the Save button.
>>>>
>>>>Any suggestion? TIA
>>>>
>>>>- Ravi
>>>
>>>Typically, if you want to refresh the combo or listbox content you issue:
>>>
>>>combo.Requery()
>>>combo.Refresh()
>>
>>Hi Nick:
>>
>>Thank you for your reponse. I included the requery() and refresh() in the save button, while saving the new entries. regardless, when I went back to the combo to see if the new entry was there, I did not see it. when I closed the form and fired it again, the new entry was in the combo. So how should I handle this? TIA.
>>
>>Ravi
>
>How exactly you did set up the combo? Could you show your code from Load method?
This is what I have in the load method:
select * from labtests into cursor LabTestInfo order by testcode, testname
>The combo supposed to have combo.RowSourcetype = 3 - SQL statement and combo.RowSource = [your SQL statement here]
I set the properties as follows:
ControlSource = mLabTestCode
RowSource = LabTestInfo.testcode
RowSourceType = 2-Alias
In the Save button I have the same select statement as above, but the newly entered data does not show up in the combo after clicking Save. It does if I fire the form up again.
TIA.
- Ravi
- Ravi
True greatness consists in being great in little things.
- Charles Simmons