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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo box loading from multiple tables 1

Status
Not open for further replies.

DMSReed

Programmer
Mar 18, 2005
10
US
I need to load a combo box from a predefined table (RowSourceType=6). The table to use for the RowSource property will be based on a previously selected item from a prior combo box. If combo2.value='B' then RowSource=B, otherwise RowSource=A. (Both RowSources A and B are pre-established tables).

I have tried various things based on earlier threads but have encountered various errors. Below i sthe code I used in the GotFocus event of the Combo box, but I received an "Unknown member" error with "RowSource" being the indicated problem.


IF THISFORM.combo2.VALUE='PRINTER'
SELECT * FROM auditp INTO CURSOR myc
ELSE
SELECT * FROM auditm INTO CURSOR myc
ENDIF
This.RowSource.value="myc"

Thanks in advance!

 
DMSReed,

The last line should probably read
This.Rowsource = "myc"

Andy
 
Thanks Andy!
Worked exactly as I hoped.

DMSReed (Scott)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top