SOLVED - How do I get the current selection of a combobox
Posted: Mon Jul 25, 2011 7:19 pm
The following code draws an error and tells me no such object exists around "fldGender"
Now fldGender is a combo box where you can either choose Male or Female.
Here is the code:
================================================
--Now save to CandidateCC
put the text of field "MonthEntry" &space & the text of field "DayEntry" &comma & space & the text of field "YearEntry" into DOB
--answer DOB
put "INSERT INTO candidatecc (CandidateCCID,FirstName,MiddleName,SurName,Gender,DOB,EmailAddr,PrimTele,ecn,skype,promo_code) VALUES ("&CandidateCCID & "," &numtochar(39) & the text of field "fldFirstName" &numtochar(39) & "," &numtochar(39) & the text of field "fldMiddleName" &numtochar(39) & "," &numtochar(39) & the text of field "fldSurName" &numtochar(39) & "," & the text of field "fldGender" &numtochar(39) &numtochar(39) & "," &numtochar(39) &DOB &numtochar(39) & "," &numtochar(39) & the text of field "fldEmailAddr" &numtochar(39) & "," &numtochar(39) & the text of field "fldPhoneNum" &numtochar(39) & "," &numtochar(39) & the text of field "fldEmergencyNum" &numtochar(39) & "," &numtochar(39) & the text of field "fldSkype" &numtochar(39) & "," &numtochar(39) & the text of field "fldPromoCode" &numtochar(39) & "," & ")" into theQuery3
answer theQuery3
revExecuteSQL dbID, (theQuery3)
answer "Information saved"
=====================================================
Can anyone help me spot the problem or is there a different way to deal with a combo box (other than 'the text of field "fldGender"')
Thanks.
Mike
Now fldGender is a combo box where you can either choose Male or Female.
Here is the code:
================================================
--Now save to CandidateCC
put the text of field "MonthEntry" &space & the text of field "DayEntry" &comma & space & the text of field "YearEntry" into DOB
--answer DOB
put "INSERT INTO candidatecc (CandidateCCID,FirstName,MiddleName,SurName,Gender,DOB,EmailAddr,PrimTele,ecn,skype,promo_code) VALUES ("&CandidateCCID & "," &numtochar(39) & the text of field "fldFirstName" &numtochar(39) & "," &numtochar(39) & the text of field "fldMiddleName" &numtochar(39) & "," &numtochar(39) & the text of field "fldSurName" &numtochar(39) & "," & the text of field "fldGender" &numtochar(39) &numtochar(39) & "," &numtochar(39) &DOB &numtochar(39) & "," &numtochar(39) & the text of field "fldEmailAddr" &numtochar(39) & "," &numtochar(39) & the text of field "fldPhoneNum" &numtochar(39) & "," &numtochar(39) & the text of field "fldEmergencyNum" &numtochar(39) & "," &numtochar(39) & the text of field "fldSkype" &numtochar(39) & "," &numtochar(39) & the text of field "fldPromoCode" &numtochar(39) & "," & ")" into theQuery3
answer theQuery3
revExecuteSQL dbID, (theQuery3)
answer "Information saved"
=====================================================
Can anyone help me spot the problem or is there a different way to deal with a combo box (other than 'the text of field "fldGender"')
Thanks.
Mike