I have an agencies.dbf that is updated in a form, MaintainAgencies, via a view, ModifyAgency. The Data Environment of the form includes the view and 2 other tables (not the agencies.dbf table). MaintainAgencies is Modal, uses a Private Data Session and can only be called from the inital form, Main.
Entries in agencies.dbf are used in another form, Reservation, that also has a Private Data Session, is Modal, and can only be called from the initial form, Main. Values from the agencies.dbf table are used in a cursor, and the cursor is the RowSource for a Dropdown list.
The problem is that when a new agency is added via the MaintainAgencies form, after the user exits the form and calls the Reservation form, the new Agency is not available in the Dropdown list. I use the following to set the rowsource of the Dropdown list:
SELECT Agency, Code, AdultPrice, ChildPrice, AdultXFRPrice, ChildXFRPrice, lActive ;
FROM Agencies INTO CURSOR cAgencies ;
WHERE IIF( Thisform.lAdding, lActive, .T. ) ORDER BY AGENCY
Thiform.AgencyCombo.RowSource = "cAgencies"
If the user exits the program and runs it again, the agency IS then avilable in the Dropdown list.
I thought maybe the Agencies.DBF table wasn't getting closed automatically in the MaintainAgencies form, so I added code to close it, if it's open in the Unload method. That didn't help.
Any input is appreciated. J