Create a new temp table and populate with n blank records

G

Gareth Mercer

Hiya,

I am attempting to create a table with n blank records in
it, where n is a vairable inputted on a form. How would I
go about this as it is driving me nuts!

The code, or query, or whatever will need to be run from a
macro OnClick event.


Thanks in advance

Gareth
 
J

Jeff Boyce

Gareth

You've described "how" you want to do something, but not "why" (i.e., the
business need). I've rarely seen a business need to create "blank records"
in an Access database -- but yours could be the exception. Why do you feel
you need blank rows?
 
G

Guest

Jeff,

I am creating a Drawing Control database for work. For
each drawing there may be a number of Sheets (but always
at least 1. These are to be stored in 2 seperate tables
(eventually as I try to work with unbound objects as much
as possible, only writing to the database when all the
required information has been entered).

Example

A new Drawing needs to be added to the database. The
common information about the drawing is entered on
frm_AddNewDocument along with the number of Sheets the
drawing has (n).

When a Next button is pressed a new unbound form should
open with n copies of the 3 sheet specific text boxes
(sheet version, number, date).

I hope this long-winded explanation is understandable!


Gareth
 
J

Jeff Boyce

Perhaps I misunderstood. I thought you were trying to add empty "sheets"
(rows) to a table. If indeed you only wish to "prepare" some receptacles
(empty sheets) for subsequent filling, you don't need to do it until you
actually have what you'll fill one with.

A form-subform design will allow you to add as many "child" (subform, sheet)
records as you need, without requiring them to be pre-established.

Or am I still misunderstanding?!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top