Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / February 2006

Tip: Looking for answers? Try searching our database.

How do I create variable records in Access?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Confusled - 28 Feb 2006 14:43 GMT
I have a list that has a variable field with numbers.  I want to use this
field and create records in a table equal to this number. ie... if the number
is 10, I want Access to create 10 records, containing the same information.  
Is there a way to do this?
Chris Marlow - 28 Feb 2006 15:50 GMT
Hi,

You can join to a dummy table with the integers from 1 to the largest number
you require. If you edit the SQL and change the join to >= or <= you will get
the desired effect.

For example;

I've got a table 'tblData' with 2 fields 'Count' & 'Data' - containing 1
record '3', 'Stuff'.

I've got a table 'tblCounter' with 1 field 'Counter' containing 4 records 1,
2, 3, 4.

If I run the query;

SELECT tblData.Count, tblData.Data
FROM tblData INNER JOIN tblCounter ON tblData.Count >= tblCounter.Counter;

I get the effect you are looking for.

Regards,

Chris.

Signature

Chris Marlow
MCSD.NET, Microsoft Office XP Master

> I have a list that has a variable field with numbers.  I want to use this
> field and create records in a table equal to this number. ie... if the number
> is 10, I want Access to create 10 records, containing the same information.  
> Is there a way to do this?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.