Creating new row in other table

Dear All,

Please teach me, how to make a new row/list in other table by entering 
number in other table. Sample, In the table A and in the field "Details", I 
put the number 2 and it automatically creates two rows in table B. Can this 
be done in MS Access? Thank you for your help.

Regards,
Maulwy
0
Utf
3/7/2010 12:46:01 PM
access.tablesdbdesign 510 articles. 0 followers. Follow

5 Replies
917 Views

Similar Articles

[PageSpeed] 47

Why?  What business need are you attempting to solve with this approach?

It's generally considered not very good database design to be creating 
'empty' rows in a second table.  Why do you want empty rows?

And if the number you enter in TableA is a 'limit', why not just create new 
rows in TableB (related, of course), until that limit is reached?

-- 

Regards

Jeff Boyce
Microsoft Access MVP

Disclaimer: This author may have received products and services mentioned in
this post. Mention and/or description of a product or service herein does
not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"Maulwy" <Maulwy@discussions.microsoft.com> wrote in message 
news:4BF7BF82-5F23-4024-8871-4BBE74E625AE@microsoft.com...
> Dear All,
>
> Please teach me, how to make a new row/list in other table by entering
> number in other table. Sample, In the table A and in the field "Details", 
> I
> put the number 2 and it automatically creates two rows in table B. Can 
> this
> be done in MS Access? Thank you for your help.
>
> Regards,
> Maulwy 


0
Jeff
3/7/2010 3:30:31 PM
On Sun, 7 Mar 2010 04:46:01 -0800, Maulwy <Maulwy@discussions.microsoft.com>
wrote:

>Dear All,
>
>Please teach me, how to make a new row/list in other table by entering 
>number in other table. Sample, In the table A and in the field "Details", I 
>put the number 2 and it automatically creates two rows in table B. Can this 
>be done in MS Access? Thank you for your help.
>
>Regards,
>Maulwy

As Jeff says, it's very rarely either necessary nor a good idea to create
empty "placeholder" records in a table. They have an unpleasant habit of never
getting filled in. 

The normal way to do this is to use a Form based on TableA, with a Subform
based on TableB, using the subform's Master/Child Link Field properties to
link them. When you enter data into the form and then the subform, Access will
automatically fill in the link, *when it is needed* and not before.

If you have some special need to do it the other way please explain.
-- 

             John W. Vinson [MVP]
0
John
3/7/2010 9:59:54 PM
Dear Jeff & John,

For example, if we do a sales order, where there is a column for the model, 
quantity and serial number. To model and quantity, comes from one table, 
while for the serial number, which I want, be inputted in the other table. 
But not all existing models, has a serial number, this is the basic one, the 
serial number I did not join in a single table. To avoid input mistakes 
serial number, if the quantity, I suppose input 2, then automatically, the 
database will add the 2 lines at the next table (the serial number tables). 
Database like this is what I mean. Example data:
Model TransID Qty
1 AAA 2
2 BBB 3

TransID SerialNumber
1 AAAXXX01
1 AAAXXX02
2 BBBXXX01
2 BBBXXX50
2 BBBXXX65

Rgds,
Maulwy

"John W. Vinson" wrote:

> On Sun, 7 Mar 2010 04:46:01 -0800, Maulwy <Maulwy@discussions.microsoft.com>
> wrote:
> 
> >Dear All,
> >
> >Please teach me, how to make a new row/list in other table by entering 
> >number in other table. Sample, In the table A and in the field "Details", I 
> >put the number 2 and it automatically creates two rows in table B. Can this 
> >be done in MS Access? Thank you for your help.
> >
> >Regards,
> >Maulwy
> 
> As Jeff says, it's very rarely either necessary nor a good idea to create
> empty "placeholder" records in a table. They have an unpleasant habit of never
> getting filled in. 
> 
> The normal way to do this is to use a Form based on TableA, with a Subform
> based on TableB, using the subform's Master/Child Link Field properties to
> link them. When you enter data into the form and then the subform, Access will
> automatically fill in the link, *when it is needed* and not before.
> 
> If you have some special need to do it the other way please explain.
> -- 
> 
>              John W. Vinson [MVP]
> .
> 
0
Utf
3/8/2010 2:39:01 PM
Dear All,

Sorry, the example should be:

TransID Model Qty
1 AAA 2
2 BBB 3

TransID SerialNumber
1 AAAXXX01
1 AAAXXX02
2 BBBXXX01
2 BBBXXX50
2 BBBXXX65 (null?)

Many Thanks,
Maulwy

"Maulwy" wrote:

> 
> Dear Jeff & John,
> 
> For example, if we do a sales order, where there is a column for the model, 
> quantity and serial number. To model and quantity, comes from one table, 
> while for the serial number, which I want, be inputted in the other table. 
> But not all existing models, has a serial number, this is the basic one, the 
> serial number I did not join in a single table. To avoid input mistakes 
> serial number, if the quantity, I suppose input 2, then automatically, the 
> database will add the 2 lines at the next table (the serial number tables). 
> Database like this is what I mean. Example data:
> Model TransID Qty
> 1 AAA 2
> 2 BBB 3
> 
> TransID SerialNumber
> 1 AAAXXX01
> 1 AAAXXX02
> 2 BBBXXX01
> 2 BBBXXX50
> 2 BBBXXX65
> 
> Rgds,
> Maulwy
> 
> "John W. Vinson" wrote:
> 
> > On Sun, 7 Mar 2010 04:46:01 -0800, Maulwy <Maulwy@discussions.microsoft.com>
> > wrote:
> > 
> > >Dear All,
> > >
> > >Please teach me, how to make a new row/list in other table by entering 
> > >number in other table. Sample, In the table A and in the field "Details", I 
> > >put the number 2 and it automatically creates two rows in table B. Can this 
> > >be done in MS Access? Thank you for your help.
> > >
> > >Regards,
> > >Maulwy
> > 
> > As Jeff says, it's very rarely either necessary nor a good idea to create
> > empty "placeholder" records in a table. They have an unpleasant habit of never
> > getting filled in. 
> > 
> > The normal way to do this is to use a Form based on TableA, with a Subform
> > based on TableB, using the subform's Master/Child Link Field properties to
> > link them. When you enter data into the form and then the subform, Access will
> > automatically fill in the link, *when it is needed* and not before.
> > 
> > If you have some special need to do it the other way please explain.
> > -- 
> > 
> >              John W. Vinson [MVP]
> > .
> > 
0
Utf
3/8/2010 2:48:01 PM
Why not use a form instead of table A?  Where will the query get the serial 
numbers to use in table B?

-- 
Build a little, test a little.


"Maulwy" wrote:

> Dear All,
> 
> Sorry, the example should be:
> 
> TransID Model Qty
> 1 AAA 2
> 2 BBB 3
> 
> TransID SerialNumber
> 1 AAAXXX01
> 1 AAAXXX02
> 2 BBBXXX01
> 2 BBBXXX50
> 2 BBBXXX65 (null?)
> 
> Many Thanks,
> Maulwy
> 
> "Maulwy" wrote:
> 
> > 
> > Dear Jeff & John,
> > 
> > For example, if we do a sales order, where there is a column for the model, 
> > quantity and serial number. To model and quantity, comes from one table, 
> > while for the serial number, which I want, be inputted in the other table. 
> > But not all existing models, has a serial number, this is the basic one, the 
> > serial number I did not join in a single table. To avoid input mistakes 
> > serial number, if the quantity, I suppose input 2, then automatically, the 
> > database will add the 2 lines at the next table (the serial number tables). 
> > Database like this is what I mean. Example data:
> > Model TransID Qty
> > 1 AAA 2
> > 2 BBB 3
> > 
> > TransID SerialNumber
> > 1 AAAXXX01
> > 1 AAAXXX02
> > 2 BBBXXX01
> > 2 BBBXXX50
> > 2 BBBXXX65
> > 
> > Rgds,
> > Maulwy
> > 
> > "John W. Vinson" wrote:
> > 
> > > On Sun, 7 Mar 2010 04:46:01 -0800, Maulwy <Maulwy@discussions.microsoft.com>
> > > wrote:
> > > 
> > > >Dear All,
> > > >
> > > >Please teach me, how to make a new row/list in other table by entering 
> > > >number in other table. Sample, In the table A and in the field "Details", I 
> > > >put the number 2 and it automatically creates two rows in table B. Can this 
> > > >be done in MS Access? Thank you for your help.
> > > >
> > > >Regards,
> > > >Maulwy
> > > 
> > > As Jeff says, it's very rarely either necessary nor a good idea to create
> > > empty "placeholder" records in a table. They have an unpleasant habit of never
> > > getting filled in. 
> > > 
> > > The normal way to do this is to use a Form based on TableA, with a Subform
> > > based on TableB, using the subform's Master/Child Link Field properties to
> > > link them. When you enter data into the form and then the subform, Access will
> > > automatically fill in the link, *when it is needed* and not before.
> > > 
> > > If you have some special need to do it the other way please explain.
> > > -- 
> > > 
> > >              John W. Vinson [MVP]
> > > .
> > > 
0
Utf
3/8/2010 3:46:01 PM
Reply:

Similar Artilces:

changing row height
Is it possible to change the row height within the same sheet of some rows without it affecting the other rows? -- A fledgling at 64 hi yes it is. are you having trouble of any kind?? to set a row....on the menu bar>format>row>row height set the height to what you want. you may have to experiment. once set to the desired height and you need to set other rows to the same height, select the other row and hit the f4 key. this is the repeat action key. the set the height of the select row to the same height as the last row. if you need to have different heights then you ...

create a roster
How can you create a weekly roster in which functions can be assigned to more than 10 people. The roster should be updatable, so that when holidays and days off are marked on the weekly roster they will be taken account of it future rosters. ...

Attach Rows with Row Data
I am trying to sort by Data/Time in a Column, but if I sort by Date/Time, Just that changes, the other columns don't change with it. How can I either LOCK or ATTACH the Rpw data together so when I sort, Everything changes, not just the Date/Time? Thanks Mike Miller Hi just select the entire data range (all columns) prior to sorting your data -- Regards Frank Kabel Frankfurt, Germany "Admiral_Kirk_1" <Admiral_Kirk_1@discussions.microsoft.com> schrieb im Newsbeitrag news:BAFA6FEE-04C3-4AFB-9FA6-CFF7A41224C9@microsoft.com... > I am trying to sort by Data/Time in a ...

importing or creating reference footnotes
I am trying to import a word document into publisher and it has reference footnotes within the document. The reference footnotes are not coming into the publisher document with the reference footnotes. Correct, they will not up to Publisher 2003. In Publisher 2003 depending on which version of Word you are using if they will or not. -- "If you don't know where you are going, any road will take you there!" ...

Mailbox not created when AD account created
A couple of days ago I noticed that I created a user account but the 'Email Addresses' tab of the user properies did not list any email addresses. Subsequent new user accounts have all experienced the same. I researched the knowledge and tried the recommended solutions to either manaully start the recipient update service or rebuild te recipient update service. Neither recommendation has resulted in a mailbox being created for this particular user or any additional user that I have created since this error first showed up. I performed a Windows update last Thursday and so I bel...

Inserting rows with Data, Formula's and Validation
Hi all, I posted this twice earlier today, but it hasn't appeared so if it triple post please forgive! I have a spreadsheet that starting at row 18 contains the following information A18=M$2 B18= Datavalidation indirect ($M$2) C18=IF(B18="No More Options",VLOOKUP($B18,INDIRECT(CONCATENATE($M$2,"_info")),1,FALSE),IF(B19<2,VLOOKUP($B18,INDIRECT(CONCATENATE($M$2,"_info")),1,FALSE),CONCATENATE(B19," x ",VLOOKUP($B18,INDIRECT(CONCATENATE($M$2,"_info")),1,FALSE)))) E18=IF(ISERROR(VLOOKUP($B18,INDIRECT(CONCATENATE($M$2,"_info"))...

Task Create - Status
I'm trying to make a simple task, when a user owner is assigned a task in CRM, it receives an email letting it know it has one. I have the following below, but it is not generating one when i assign one manually in the CRM. What to do? I've tried both the following: When task is created E-Mail to:[owner];Subject test As well as: When task is created if Task activity status = Open then E-Mail to:[owner];Subject test I've checked the mailserver many times over, and I can send emails manually from the CRM so you can rule that out Tested out ok on our end. Some ideas:...

Add a specific Record to a Table based on a check box
I have a Table called ServiceTypes. Based on a User's input on a ProposalForm, ServiceTypes need to be added to a ProposalServicesTable. For instance, I have a Check Box on the ProposalForm. When a Check Box is clicked Yes, Access must search the ServiceTypes Table, select a specific ServiceTypeID, and add the ServiceType to the ProposalServicesTable. How can I add the proper Service record from the ServiceTable to the ProposalServicesTable based on the Check Box? I wouldn't do it that way. I'd use a listbox (with multi-select set to YES) that was sourced to the ServiceTab...

Query on Group field in Pivot Table
I have a large database wherein under Date column, data is in the format "Thu Oct 1 12:00 AM". When I use Pivot Table Under OPTIONS->GROUP-> Group Field is disabled. I used this to group Date field to either present data by Month, quarter at one click. Can anybody guide me why this seems to be disabled here. I want to present my data only by Monthwithout changing the format ""Thu Oct 1 12:00 AM". Thanks Hi Shewta Check you Data Source of your Pivot. it should come up like "Sheet6!$G$1:$I$821" and not like "'\Documents and...

Pivot Table update without opening the Excel file.
Hi, I have a spreadsheet saved as an xlt. It has three pivot tables which connect to CSV data files using Microsoft Text Driver. The CSV files are updated overnight by an external application. The Excel file is in \\Server\Viewers The Data files are in \\Server\Data Local users use a shortcut to open the Excel file on \\Server\Viewers which the does an auto-update from the CSV files. The pivot table data is updated. All that has been working perfectly for years, internally. Now I need to send the same excel file to another company by email. I have succeeded in writing a vbscript that creates...

New Store in other country
hi all, we have opened a new store in other foreign country, the problem is this new store will receive stock and sell with his local currancy ( currancy rate 1.2 ). How can we manage this store ( calculate the cost ,reports... etc) in HQ. any help please thanks Get ready for a lot of manual work. The way I handle it is each stoer is in local currency. When I transfer something from location to location, I manually change the costs on the transfer in at the receiving store. "Sad" <Sad@discussions.microsoft.com> wrote in message news:B929754D-D285-42BA-B2D1-03D6D0262902...

Help Creating XmlNode / XmlAttribute Elegantly
I am creating a configuration class to read / write a standard configuration file. <?xml version="1.0" encoding="utf-8"?> <configuration> <appSettings> <add key="ConnectionString" value="server=(local);" /> </appSettings> </configuration> I am using a XmlDocument for my base implementation. I am looking to see if there is a better way to add a new node / attribute than using XmlDocument.InnerXml. I would consider this to be a hack but couldn't really see another way of doing this without definin...

Bug with cell merging in tables using Applescript
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel Once you have merged cells in a table in Word 2008 using Applescript, any further reference to the table's cells in the script produce an error. <br><br>As an example, open Word 2008 and run this script: <br> tell application &quot;Microsoft Word&quot; <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;make new table at active document with properties {number of rows:4, number of columns:4} <br> &nbsp;&nbsp;&nbsp;&nbsp...

Splitting one table into multiple tables/tabs
Hi I was wondering if anyone can help me split a table into multiple tables or tabs. If I have a table of 20 customers with various transactions over time all in one table. I'd like to know if it's possible to seperate the table into multiple tables based on the change in customer number and have them broken into multiple tabs without manually creating each tab and then cut and pasting. I really appreciate any help! Thanks! ...

Create external database
Hi all. I need to create an external database (file). On a site I found this code: ------------------------------------------------------ Function CreateLinkedExternalTable(strTargetDB As String, strProviderString As String, strSourceTbl As String, strLinkTblName As String) As String 'strTargetDB = Source Database Name 'strProviderString = Not used, currently hard coded 'strSourceTbl = Source Table name in the database we are linking too. 'strLinkTblName = Table name we would like to see in the Access Database. Dim catDB As ADOX.Catalog Dim tblLink As...

tabls in GP90 database
Does anyone know or have a description or documenation on the tables in the database for GP90? Maybe all I need is the important ones. thanks Within the program itself, Tools > Resource Descriptions Also, there are ERD's on the distribution CD's that you got when you purchased or upgraded the system - you have to install the SDK to get at them. -- Lyle U Adam Clark wrote: > Does anyone know or have a description or documenation on the tables > in the database for GP90? Maybe all I need is the important ones. > > thanks ...

How to create pie chart with %
I have got a problem that I don't if excel could help me to calculate the % within a column and draw a pie chart. My case is I have a column containing a series of numbers. e.g. 1,4,8,1,3,9,11,2,4,5,6,.........etc I want to draw a pie chart that showing 1-3 , 4-6, 7-9, >9 with the corresponding % inside that column. Can anyone tell me how can I make it ? Ray - You need to calculate the frequencies in your data. Let's assume your data is in A1:A12. In B1:B3 enter these numbers, the upper limits on the groupings: 3 6 9 You can enter ">9" into B4 witho...

Email address not created when a new user is created
All, This issue recently happened in my company. Upon creating a new user, the policy was set to create the smtp and X400 address automaticaly. Now when we create a user the smtp and x400 addresses are not created, and when attempting to setup the new user in outlook, the address cant be found. We are using exchange 2003 SP1 on Win2k3 servers. On Wed, 13 Jul 2005 06:49:07 -0700, "Bryan" <Bryan@discussions.microsoft.com> wrote: >All, >This issue recently happened in my company. Upon creating a new user, the >policy was set to create the smtp and X400 addres...

how do I copy a range to a new sheet
Now that I this group solved my problem of flagging dates of my club members as "expired", how would I automatically copy all of the members that are expired to a new worksheet so I can use this for a mail merge? I would need to check the condition of the expired column, YES or NO, then copy the yes's name and address columns only to a new page. TIA Why not just add that column and when you use mailmerge, just include the records with that flag set the way you need? If you really want to copy the rows, you could apply Data|Filter|Autofilter and filter to show just those mem...

when form created
I have a form which was created by someone else (not a form template) which is like a questionnaire with empty boxes to be completed. When the boxes are typed in all the margins move to accommodate the words being typed. Is there a way to fix/lock the original form and then just fill in the blank boxes? I suspect this is set up as a table with auto resizing enabled. Displaying table gridlines (Table | Show Gridlines) will help you see what you're dealing with. Then select the table, go to the Table tab of Table Properties, click Options, and clear the check box for "A...

Exchange 2010 MRM, no log files being created
I'm hoping someone can help me with this issue....it has been driving me crazy for days. I have enabled MRM logging on our exchange server, and I can see that some of the policies are working when I run start-managedfolderassistant. We have a retention policy tag on the deleteditems folder, and this does work. The problem is I am not getting any files in the MRM log directory. C:\Program Files\Microsoft\Exchange Server\V14\Logging\Managed Folder Assistant Events 9021 and 9022 are logged in the Application log, but where are the files? Below is the output of my mai...

Outlook notification of new mail.
To clarify, the notification works for new messages to Inbox, but fails to display the icon when the message is automatically moved to a subfolder based on a rule. A quick look in Google seems to to suggest that this is something that has been deliberately changed from Outlook XP. Cheers Paul <paul.francis@agresearch.co.nz> wrote: > To clarify, the notification works for new messages to > Inbox, but fails to display the icon when the message is > automatically moved to a subfolder based on a rule. A > quick look in Google seems to to suggest that this is > somethin...

How do you edit HTML source in a new outlook email message?
Trying to create a new email message by inserting HTML. I don't see a place to edit source for a new message. This is probably a really easy thing to do, I just can't find out where the "edit source" option is, and the help files don't seem to be any help. Thanks, Justin The feature doesn't exist in Microsoft Outlook. "justinvanderpol" <justinvanderpol@discussions.microsoft.com> wrote in message news:1ADC71DF-40BC-4656-98A8-A473EB40E837@microsoft.com... > Trying to create a new email message by inserting HTML. I don't see a > place ...

Creating a Brochure
How do you create a 3-column brochure from scratch for Publisher 2002? I can only find the directions for the 2003 version. Quick help would be appreciated, project is due Monday. Create a three-panel or four-panel folded publication http://office.microsoft.com/en-us/assistance/HP011646681033.aspx Scroll down to the section that says "Build a three-panel or four-panel publications from scratch." -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "Derek" <Derek@discussions.microsoft.com> wrote in message news...

New POP3 E-Mail Account Deliver Folder
I have both an Exchange Account and a (personal) POP3 account that I check using Outlook 2003. Currently, both accounts drop new e-mail into my Exchange Inbox - and I have a rule that moves the POP3 e-mail to a personal folder inbox. Problem is, rules don't run when I'm not connected to the Exchange server. Is it possible to have the POP3 account post new e-mails to the personal folder, while keeping the Exchange account posting new e-mails to the exchange inbox? Thanks; Michael Have you tried to set up a personal folder specifically for the pop account and set the exchange acc...