Loop Problem

  • Thread starter Thread starter DavidW
  • Start date Start date
D

DavidW

I am wanting to copy a field [veh] in a query [adtype] to a table [adusage]
in a field called [veh].
Can this be done from with-in a form off of a vb bytChoice return and if so
can I take a date from a textbox within that form and copy it with the
other.
 
-----Original Message-----
I am wanting to copy a field [veh] in a query [adtype] to a table [adusage]
in a field called [veh].
Can this be done from with-in a form off of a vb bytChoice return and if so
can I take a date from a textbox within that form and copy it with the
other.
Hi David,
the short answer is 'yes'
create a recordset and use the edit or addnew method.

for example using dao...
private sub AddVeh()
dim rst as dao.recordset
set rst=currentdb.openrecordset("tablename")
with rst
.addnew
.fields("veh")=me.txtveh
.fields("date")=me.txtdate
.update
.close
end with
set rst=nothing
end sub

Luck
Jnathan
 
Back
Top