|
-
Jun 1st, 2006, 11:23 PM
#1
Thread Starter
Hyperactive Member
[2005] Binding Radiobutton
I had a database that was designed by someone and use from the old system which in turn had many bugs.I was assigned to make a new system using this old database since all the transactions are here.Now there are two radiobutons(rbtnMale,rbtnFemale) which was suppose to be bounded to a certain field of my database table.The field Sex of the database happens to be of value 'M' and 'F', and since radiobuttons check propertty can be either true or false which can be equate to '1' or '0', I decided to have this code in my query.
SELECT PatientID,
LastName,
FirstName,
MName,
DateOfBirth,
Sex,
IIF([Sex]="M", 1, 0) as IsMale,
IIF([Sex]="F", 1, 0) as IsFemale,
SeniorCitizenID,
Address,
Phone,
Mobile,
Fax,
Email,
Guardian,
Date_Registered,
VisitDate, [Note],
Tag,
OrderTotal,
Total_Paid,
Name,
Encoder,
InDate
FROM PATIENT IIF([Sex]="M", 1, 0) as IsMale,
Executing this line makes the F and M be bounded to the two radiobuttons,but the problem arises when I had to update or make a new record.It was giving me this exception..."Duplicate output destination 'Sex' ".I know this is because of the query, can someone please show me how can I able to fix it?...thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|