Create Table

Haytham

Registered User.
Local time
Today, 06:09
Joined
Jun 27, 2001
Messages
162
Hi All...
I have a form with a field Date().
It should check the system date and then inserts data into a tblMay2002.
If system date is June2002 then it should create a table named : tblJune2002 and insert data in there.
Any clue
 
Use DAO code to add to the appropriate table"

dim rs as DAO.recordset
dim db as DAO.database

set db=currentdb()
select case datepart("mm",Date())
Case "Jan"
set db=db.openrecordset _("tbJan02",dbopendynaset)

etc for each appropriate month

end select
rs.addnew
store your data here
rs.update
rs.close
set rs=nothing
set db=nothing
 
Hi llkhoutx,Pat... I think that you are right, it is better to keep all the data in a single table.
Thanks a lot.
 

Users who are viewing this thread

Back
Top Bottom