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

Dates in a combo box

Status
Not open for further replies.

RGoldthorpe

Technical User
Aug 10, 2001
83
GB
Hello

How is everybody hope you are all well and bouncy

I have a ikkle problem sure it is only little but bugging me now

I have a combo box that list all the dates from a table from selecting the date this should limit the selection of sample ids to only samples that have that date however I keep getting operator/operand mismatch when I select my date

The code is as follows


SELECT FileTtoResult(trd_sResult) ; ;
from testsetresultsheader, testresults; ;
where ; trd_iHeaderID = tsr_iID and; trd_sTest = 5000 and; tsr_sSeason = thisform.cboSeason.Value and; tsr_sTestSet = "FARMSTORES3" and;
tsr_sSiteID =thisform.cboStoreLoc.Value and;
tsr_sStoreID =thisform.cboStoreID.Value and;
tsr_ddate = this.value;
into;
array arr_sampleIDs

thisform.cbosample.Enabled=.T.
thisform.cbosample.NumberOfElements=ALEN(arr_sampleIDs)

I know the date is the problem because I have run it through the debugger and that is where it fall over

Any help greatly appreciated

ThanX

Rachel

 
Hi Rachel,
The combobox value returned may not be date. The valid data types allowed in a combo box is Character, Integer and Numeric. So you have to convert that to date and rest is easy for you to undrstand :) ramani :-9
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
 
HI Rachel..
Little more explanation..
tsr_ddate = this.value.... This.Value is a character type value. SO convert it to date.. you will be thru :) ramani :-9
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
 
Thank you

I did wonder that but it has only come up with this problem or it appears to since I swapped the two combo sample and date around before it worked ok but will go give it a try now

Thanx again

Rach
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top