hmm there is a form question , 2 button yes or no and a db text, this db text consit data question . i want to 2 button yes or no checking to field(yes/no) in tabel database acces if in field valuable T0.. then show question in dbtext on the form same. or if in field valuable H0.. then show result in form result
i already try but no appropriate with my plan..in the form result/answer there is db text and show result./answer diffrent with the queston
this is example code
procedure Tformtanya.Button2Click(Sender: TObject); begin tbBagian.Next; if dbtext1.Field.AsString = 'T01' then dbtext1.Field.DataSet.Next else begin Formanswer := TFormanswer.Create(nil); Formanswer.showmodal; Formanswer.free; end; end;
can you give some detail?
ReplyDeletehmm there is a form question , 2 button yes or no and a db text, this db text consit data question . i want to 2 button yes or no checking to field(yes/no) in tabel database acces if in field valuable T0.. then show question in dbtext on the form same. or if in field valuable H0.. then show result in form result
ReplyDeleteIf you needs to call another form which different from form that you lied your 2 buttons there you must use
ReplyDeletewith TFormName.Create(self) do
Begin
ShowModal;
End;
i already try but no appropriate with my plan..in the form result/answer there is db text and show result./answer diffrent with the queston
ReplyDeletethis is example code
procedure Tformtanya.Button2Click(Sender: TObject);
begin
tbBagian.Next;
if dbtext1.Field.AsString = 'T01' then
dbtext1.Field.DataSet.Next
else
begin
Formanswer := TFormanswer.Create(nil);
Formanswer.showmodal;
Formanswer.free;
end;
end;
Which part from your code that show error warning?
ReplyDeleteno error mas,, but this run no approriate with my plan :(
ReplyDelete