> 혹시 간단한거라도 있으신분 계시면 좀 주셨으면 합니다...아니면 그냥 간단한 프로그램 방법이라도...알려주시면 굉장히 감사하겠습니다.....
> 제발.........
아래의 영문은 DBCheckBox의 사용법의 영문입니다.
아래의 내용을 요약하자면 DBCheckBox에서는 ValueChecked와 ValueUnChecked
란 프로퍼티가 키포인트 입니다.
DataField에 들어 있는 특정 스트링의 값을 valuechecked와 valueunchecked
에 있는 값과 비교하여 valuechecked와 같으면 check를 해주고
valueunchecked와 같으면 uncheck를 해줍니다.
프로퍼티사용법은 다음과 같습니다.
DBCheckBox1.ValueChecked := 'True;Yes;On';
True, Yes, On이란 3가지 스트링을 만나면 check해줘란 뜻이죠
만약 Valuechecked와 valueunchecked에 걸리리는 스트링이 아니면
Gray형태로 보여 줍니다. 마치 Unabled같은 형태이죠
도움이 되셨길......
Use ValueChecked to specify the field value represented by the check box when it is checked. If the value of the ValueChecked property is equal to the data in the field of the current record of the dataset, the database check box appears checked. When the user checks the database check box, the field value is set to ValueChecked.
ValueChecked can represent more than one value in a semicolon-delimited list of items. If any of the items matches the contents of the field of the current record in the dataset, the check box appears checked. For example, set the value of ValueChecked string like this:
DBCheckBox1.ValueChecked := 'True;Yes;On';
If the contents of the associated field is the string True, Yes, or On, the check box is checked. The value of the field is compared to ValueChecked in a case-insensitive comparison. If the user selects a check box where ValueChecked represents more than one value, the first item in the list is assigned to the field.
If the contents of the field of the current record matches a string specified as the value of the ValueUnchecked property, the check box appears unchecked. If the contents of the field matches no string in either ValueChecked or ValueUnchecked, the check box appears gray.
> 안녕하세요.
> DBCheckbox를 사용하여 검색프로그램을 한번도 작성해 보지 않아서....
> 혹시 간단한거라도 있으신분 계시면 좀 주셨으면 합니다...아니면 그냥 간단한 프로그램 방법이라도...알려주시면 굉장히 감사하겠습니다.....
> 제발.........
장영선님 안녕하세요?
어떤것을 원하시는지 모르겠지만,
DBCheckbox라는 놈은 테이블과 붙었을때 보여줄수있는
화면에 불과하죠. 그리고, 모 아니면 도 이니 Boolean형이겠구요.
검색을 하신다고 하셨는데, 첵크가 되어 있으면 SQL문장에 더하구
아니면 더하지 않구.. 등으로 Query문을 작성하시는 방법이 어떨까요?
예를들면,
begin
Query1.Close;
Query1.Sql.Clear;
Query1.Sql.Add('select * from 테이블명');
if DBCheckbox1.Checked = True then
begin
Query1.Sql.Add('where 필드 >= 필드 '); //첵크되어 있으면
...
... //기타 SQL문 추가..
else
Query1.Sql.Add('where 필드 <= 필드 '); //첵크되어 있지 않으면..
Query1.open;
end;
위와 같은 형태는 예를 든 것이구요,
일반적으로는 쿼리문의 문자열 변수를 사용해서
조립하는 형태가 많습니다.
질문하신것에 합당한 답변이면 좋겠네요.
아니라면 다시 질문올려주세요..
그럼.. 즐거운 코딩 되시구요..