Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 25th, 2013, 09:00 PM
Registered User
 
Join Date: Nov 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Adding Multiple Records

Hi,

I have a table with the following fields:

InspID(AutoNumber)
Crane Number
RepairID
AreaNumber
Date Of Inspection
Crack Length
Image Path
Inspector Name

The main fields I am looking to update is the Crane Number and AreaNumber.

A form should be able to update this 2 fields, the rest of the fields can remain blank. The Crane Number field is linked to another table where a list of Crane numbers are stored and I am thinking of using a combobox for the user to select a Crane number to update. They should only be able to add 1 crane at a time.

1 Crane Number should automatically add 82 area numbers into the table. The 82 area numbers are stored in another table called Area Number.

Is there any way to do this, and if yes how?

Thanks
 
Old July 2nd, 2014, 02:57 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default Hey

I am not sure what you are trying to do, but it sounds like something you would first do at the table level. You need to make the CraneNumber a look up value to the Crane table. Then when you create your form, you will automatically get a combo box for your users to look up a crane number.

Then I am not sure what you want to do next. Do you want the AreaNumber field to contain 82 separate numbers, or do you want to create 82 new records? If your Area Numbers are already stored in another table, you can make that a look up column as well.

You could just write some simple code to insert 82 records after the user selects the Crane number. I would do this with an unbound form, however, with a combo box that looks up the crane number, and then a commit button that adds the records.

Do you have more info on what you want to do?
__________________
mmcdonal

Look it up at: http://wrox.books24x7.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
adding multiple records Vince_421 VB Databases Basics 4 February 28th, 2007 07:22 AM
adding multiple records at the same time Vince_421 Access VBA 14 February 1st, 2007 10:28 AM
Adding records to Tables lgpatterson Access VBA 6 March 20th, 2005 07:23 AM
Ouch: 80004005 (adding multiple records) PeterVR Classic ASP Databases 7 September 14th, 2004 06:36 AM
adding records sinner Classic ASP Databases 5 February 25th, 2004 06:12 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.