Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Access problems.
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00876401
Message ID:
00876412
Views:
10
Update:

I removed the REFRESH of the form where it was called in code and this seems to have solved the problem.
Thoughts?

Keith


>I have a program that I am working on which has a small form the user can select a location from. On the form is a list box that I populate a list of locations from a table that is opened as the form loads. I have a double click event in the list box that runs the code necessary to populate the toolbar in the program with the correct location that the data will be processed for. The problem I am having is that sometimes when I double click on the location I want to select in the list box I get an error that says, "Cannot access the selected table." There is only one table on the form that gets used so it must be something in the code. I will paste the code below from each event on the form so you can see what is being done.
>
>*====================================*
>Load Event of the form:
>*====================================*
>SET MULTILOCKS ON
>IF ! USED("locations")
>USE common\locations IN 0 EXCLUSIVE
>ENDIF
>SELECT locations
>GO TOP
>CURSORSETPROP("Buffering",5)
>
>*====================================*
>Init Event of the form:
>*====================================*
>SET DELETED ON
>THISFORM.lst_location.ROWSOURCE=""
>THISFORM.REFRESH
>THISFORM.lst_location.ROWSOURCE="locations.location"
>
>*====================================*
>Unload Event of the form:
>*====================================*
>SET MULTILOCKS OFF
>
>*====================================*
>Destroy Event of the form:
>*====================================*
>CLOSE DATABASES ALL
>
>*====================================*
>Interactive Change of the listbox:
>*====================================*
>WITH oTB.txt_location
>.VALUE = THIS.VALUE
>ENDWITH
>
>THISFORM.REFRESH
>
>*====================================*
>Exit button on the form: (The double click event in the list box activates this click event.)
>*====================================*
>WITH oTB.txt_location
>.VALUE = THISFORM.lst_location.VALUE
>ENDWITH
>THISFORM.REFRESH
>IF ! EMPTY(oTB.txt_location.VALUE)
>oTB.cmd_newBillings.ENABLED = .T.
>oTB.cmd_import.ENABLED = .T.
>THISFORM.RELEASE
>ELSE
>oTB.cmd_newBillings.ENABLED = .F.
>oTB.cmd_import.ENABLED = .F.
>ENDIF
>THISFORM.RELEASE
>*====================================*
>
>
>Any help would be greatly appreciated.
Anything worth doing is worth doing...The right way!
Previous
Reply
Map
View

Click here to load this message in the networking platform