Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

2 remote view cursors to populate comboboxes

Status
Not open for further replies.

steinkebunch

Programmer
May 24, 2000
7
0
0
US
I created two cursors from remote data, and would like to populate comboboxes on my form with these cursors. I can see both cursors in the Datasession window, but according to VFP help, these cursors are not opened in the work area.

The rowsource of of each comboboxes reads as follows:

Combobox1:
Code:
select * from cursor1

Combobox2:
Code:
select * from cursor2

When running the form, one combobox populates fine, the other generates a "Cannot access the selected table" error. Is it that VFP does not see the second cursor? I tried adding a
Code:
select cursor1
or
Code:
select cursor2
statement to each comboboxes init method. That did not help.

Any suggestions? Thanks in advance.
 
Instead of re-Selecting these records for the Comboboxes, just make sure both have the property "Style" set to "2 - Dropdown List". Set the "RowSourceType" to "6 - Fields", and then set the respective "RowSource" to "cursor1.field1, field2, field3" and "cursor2.field1, field2, field3" (I'm obviously assuming three fields per cursor).

Rick
 
Thanks for your help. Your suggestion solved the problem.

Steinkebunch
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top