Problemas con tabla access FieldByNOMBRE
tengo do from que estan relacionado el primero tiene este codigo el cual me esta dando error el cual esta acesando a una base de dato qu esta en acces el nombre de la tabla es tSalidaequipos la cual esta en un datamodule o no se si es FieldByNOMBRE que esta funcion no funciona con access.
procedure TConexionDB.TSalidaequiposNewRecord(DataSet: TDataSet);
begin
TConexionDB.tSalidaequipos.FieldByNOMBRE('Fecha').AsDateTime := Now;
end;
procedure TConexionDB.DataModuleCreate(Sender: TObject);
begin
end;
end.
el otron del que de pende este es
unit FConsuFechaEquip;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, DBCtrls, Mask, Grids, DBGrids, ExtCtrls, Buttons;
type
TFConsuEquiFech = class(TForm)
SpeedButton1: TSpeedButton;
SpeedButton2: TSpeedButton;
SpeedButton3: TSpeedButton;
SpeedButton4: TSpeedButton;
Label2: TLabel;
Label3: TLabel;
Label5: TLabel;
Bevel1: TBevel;
Label1: TLabel;
Label4: TLabel;
Label6: TLabel;
DBGrid1: TDBGrid;
Desde: TMaskEdit;
Hasta: TMaskEdit;
DBMemo1: TDBMemo;
DBComboBox1: TDBComboBox;
DBComboBox2: TDBComboBox;
procedure SpeedButton4Click(Sender: TObject);
procedure DesdeExit(Sender: TObject);
procedure HastaExit(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure SpeedButton1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FConsuEquiFech: TFConsuEquiFech;
implementation
uses login;
{$R *.dfm}
procedure TFConsuEquiFech.SpeedButton4Click(Sender: TObject);
begin
Close ();
end;
procedure TFConsuEquiFech.DesdeExit(Sender: TObject);
Var
A,B: TDate;
begin
A:= Strtodate(Desde.text);
B:= Strtodate(Hasta.text);
if A > B then
Begin
Showmessage('La Fecha inicial no Puede ser Mayor que la Final');
desde.clear;
Activecontrol:= desde;
End;
end;
procedure TFConsuEquiFech.HastaExit(Sender: TObject);
Var
A,B: TDate;
begin
A:= Strtodate(Desde.text);
B:= Strtodate(Hasta.text);
if B < A then
Begin
Showmessage('La Fecha Final no Puede ser Menor que la Inicial');
Hasta.clear;
Activecontrol:= Hasta;
End;
end;
procedure TFConsuEquiFech.FormShow(Sender: TObject);
begin
desde.Clear;
hasta.Text := datetostr(now);
Desde.Text := datetostr(now);
end;
procedure TFConsuEquiFech.SpeedButton1Click(Sender: TObject);
begin
With login do begin
QConsFechaobra.active :=false;
QConsFechaobra.ParamByName('fecha1').AsDate:=StrToDate(desde.text);
QConsFechaobra.ParamByName('fecha2').AsDate:=StrToDate(hasta.text);
QConsFechaobra.active :=true;
// QConsFechaobra.Dataset := QConsFechaobra;
activecontrol := Desde;
activecontrol := Hasta;
end;
end.
|