>new appearance.
>>>>>>>
>>>>>>>Hi. I could also put this into a cmdbutton as well right? Can you clue me in as to the exact syntax of the command? I've unsuccessfully tried:
>>>>>>>"thisform.mylistbox2.rowsource=whatyear"
>>>>>>
>>>>>>Yes you can use cmdbutton too. The right syntax, assuming that whatyear is cursor name, is:
>>>>>>thisform.mylistbox2.rowsource='whatyear'
>>>>>
>>>>>Actually I've not used cursors in forms. All a cursor is is a temporary database so would it make a difference to use the actual dbf?
>>>>
>>>>You can use actual dbf alias.
>>>
>>>Still not there yet. In the cmdbut I have:
>>>offyear='office'+myear
>>>thisform.mylistbox2.rowsource='&offyear'
>>>
>>>So that offyear can equal a dbf something like office97,office96,or office98.
>>>What should I put in the property section of listbox2 in the rowsource and the rowsourcetype?
>>
>>*** in Form.Designer
>>With Thisform.Listbox2
>> .RowSourceType=2
>> .RowSource=""
>>Endwith
>>*** when refreshing
>>With Thisform.Listbox2
>> .RowSource=""
>> *** use one of following two lines
>> .RowSource='offyear' && if offyear is literal alias or
>> .RowSource=offyear && if offyear is variable storing alias
>> .Requery
>>Endwith
>
>I hardcoded the dbf for testing:
>"thisform.mylistbox2.rowsource= "office97" "
>The error I get is "field phrase is not found"
>I'm sure I'm doing something stupid.
It means that you typed 'phrase' somewhere in listbox property sheet. Find the place and clean it.
Edward Pikman
Independent Consultant