Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Use DATE type in Combo Box
Message
From
13/01/1999 10:06:28
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00175027
Message ID:
00175421
Views:
47
Sunny ---

It should be irrelevent whether or not it's a free table or a databased table. Where are you opening TBL? This could still be a scope problem.


>Perhaps I know the problem but I don't know how to solve it.
>
>The properities of combo box are
>
>combo.ControlSource = TBL.date
>combo.Format = D
>combo.InputMask = {99/99/9999}
>combo.RowSourceType = Array
>combo.RowSource = adate
>
>TBL is a FREE TABLE which is convert from Foxpro2.6!
>
>When I remove the ControlSource, there is no error again. I think the ControlSource caused error.
>
>Do you know what's wrong with my combo box?
>
>Sunny
>
>
>>As David and Ed pointed out, arrays are not too wonderful to use and there is a scope issue as to where to define it. I would back up David on defining it in the Init() of the ComboBox but you're probably better off using a View for this, especially if you might have to reference the RowSource elsewhere in the form.
>>
>>
>>
>>>I define the array in DataEnvironment by the command 'SELECT TBL.DATE FROM TBL INTO ARRAY ADATE'. The data type is DATE. The ControlSource data type is DATE too.
>>>
>>>I am using VFP6
>>>
>>>Sunny
>>>
>>>>Where is the array defined and what type of data is the ControlSource for the combobox?
>>>>
>>>>>Yes, I have set boundto = .T. already.
>>>>>
>>>>>Sunny
>>>>>
>>>>>>>i want to use a array to store some data. All data are in 'date' type. The data will be used to be a RowSoure in combo box. I can do it in form designer without any error. But when I run the form, an error comes out that the data type is mismatched in the combo box. But, although I have an error, the form and combo box still can work.
>>>>>>>
>>>>>>>Do you know what's wrong?
>>>>>>>
>>>>>>>Any idea is welcome.
>>>>>>
>>>>>>Usually, it all indicates that you forgot to set Combo.BoundTo=.T.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Reply
Map
View

Click here to load this message in the networking platform