A
anil
Hi all
i have 3 tables-tblnew(Location,Site,Adate),
tbllog(Location,Site,Bdate,SampleID) and
tblsample(SampleID,Site,Result,CDate).
I use append query in vba to add data from tblnew into tbllog such as
(Example)
insert into tbllog(Location,site,Adate) select location,site,BDate from
tblNew.
Then I used seek in vba to find records fro a particular
date(19/05/2006) in tblLog and put them in tblSample as
insert into tblSample(CDate,Site)select BDate,Site from tblog.
This helps me to get SampleID Which is autoNumber.
Now I want to Update/Append records in tbllog as
insert into tbllog(SampleID) Select SampleID from tblSample where
date=#19/05/2006#.
So that I HAve log record of Location,Site,Date,SampleID in one go.The
output looks as
LOCATION SITE ADATE SAMPLEID
Ara 1 19/05/2006 1
Ara 2 19/05/2006 2
The net Question is CAN I ADD DATA TO FIELD-SAMPLEID(WHICH IS NULL)
WHEN ALL OTHER FIELDS- LOCATION,ADATE,SITE ARE FILLED i.e I JUST WANT
TO REPLACE NULL VALUE(OR 0) FROM SAMPLEID WITH SOME DATA FROM
TBLSAMPLE.Using append query adds the data into new records.I just want
to add SampleID where ADATE is date(any)
thanks
anil
i have 3 tables-tblnew(Location,Site,Adate),
tbllog(Location,Site,Bdate,SampleID) and
tblsample(SampleID,Site,Result,CDate).
I use append query in vba to add data from tblnew into tbllog such as
(Example)
insert into tbllog(Location,site,Adate) select location,site,BDate from
tblNew.
Then I used seek in vba to find records fro a particular
date(19/05/2006) in tblLog and put them in tblSample as
insert into tblSample(CDate,Site)select BDate,Site from tblog.
This helps me to get SampleID Which is autoNumber.
Now I want to Update/Append records in tbllog as
insert into tbllog(SampleID) Select SampleID from tblSample where
date=#19/05/2006#.
So that I HAve log record of Location,Site,Date,SampleID in one go.The
output looks as
LOCATION SITE ADATE SAMPLEID
Ara 1 19/05/2006 1
Ara 2 19/05/2006 2
The net Question is CAN I ADD DATA TO FIELD-SAMPLEID(WHICH IS NULL)
WHEN ALL OTHER FIELDS- LOCATION,ADATE,SITE ARE FILLED i.e I JUST WANT
TO REPLACE NULL VALUE(OR 0) FROM SAMPLEID WITH SOME DATA FROM
TBLSAMPLE.Using append query adds the data into new records.I just want
to add SampleID where ADATE is date(any)
thanks
anil