A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Create a new temp table and populate with n blank records



 
 
Thread Tools Display Modes
  #1  
Old May 17th, 2004, 11:17 AM
Gareth Mercer
external usenet poster
 
Posts: n/a
Default Create a new temp table and populate with n blank records

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
  #2  
Old May 17th, 2004, 01:59 PM
Jeff Boyce
external usenet poster
 
Posts: n/a
Default Create a new temp table and populate with n blank records

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?

--
More info, please ...

Jeff Boyce
Access MVP

  #3  
Old May 17th, 2004, 02:18 PM
external usenet poster
 
Posts: n/a
Default Create a new temp table and populate with n blank records

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
  #4  
Old May 19th, 2004, 01:38 PM
Jeff Boyce
external usenet poster
 
Posts: n/a
Default Create a new temp table and populate with n blank records

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?!

--
Good luck

Jeff Boyce
Access MVP

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:56 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.