473,473 Members | 1,959 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Adding Incremental Records

I have a table to track equipment in a network, we'll use 24-port hubs
as our example. tblEquipment has fields:
ID - Autonumber
Equipment - Text (Hub,Router,etc)
Location - Text (BLDGA, BLDGB, etc)
RR - Text (RR101.01,RR101.02, etc)
Shelf - Number (1,2,3,etc)
Port - Number (1,2,3,etc)

I want to add a new hub to the network so I create a form frmEquipment
and enter 24 records manually.
HUB,BLDGA,RR101.01,1,1-24

Is there a way to add all 24 records automatically?

Up until now I have been building the data in Excel cause I can
Autofill and importing into the table but I need something easier for
my end users.

Nov 13 '05 #1
1 1727
the easiest way is probably to have the "Starting Port " and "Ending
Port" as unbound text fields on a form and then pass them to a routine
to do it...

Sub AddPorts(lngEquipmentID as Long, lngStart as Long, lngEnd as Long)
dim rsPorts as DAO.Recordset
dim lngCounter as Long

set rsPorts = dbengine(0)(0).OpenRecordset("Equipment",dbopentab le)
for lngCounter = lngStart To lngEnd
with rsPorts
.Addnew
.Fields("PortNumber")=lngCounter
.Fields("EquipmentID")=lngEquipmentID
'--add more fields down here as you need to
.UPDATE '===save the record
end with
next lng Counter

rsPorts.close
set rsPorts=nothing

then you attach all that ugly code to a button and away you go.. oh,
and be sure to check for stupid errors first - like nonumeric values
(set the format to numeric on your textboxes). and values that don't
make sense...etc.

Hpe this gets you started.
Pieter

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Jamie Fryatt | last post by:
Hi everyone, here's what id like to do. I have a table with 2 fields, name and value I need to be able to add multiple records quickly, for example I need to add name value abc 1...
1
by: jane | last post by:
HI, I had a question on incremental backup. We had an incremental backup every weekend. We did full backup every other week. That is one week incremental + full , the other week is...
3
by: apple | last post by:
UDB v8 fp 6a on AIX 5.1.0.0 Below is a manual incremental recover from compressed backup datasets. With external compress backup datasets, can it be coded to do an automatic incremental recover?...
0
by: Willem | last post by:
Based on MK's TSI_SOON (http://www.trigeminal.com/)I've created a nifty little procedure that - whenever you compact you db you get an incremental backup copy. Given that you have a table with...
3
by: Colleyville Alan | last post by:
I have a incremental search box that has been working fine for a couple of months but is now acting up. This search box is from the cd that comes with Getz's book, so I did not write it and have...
6
by: Rudy Ray Moore | last post by:
I work with a multi-project workspace. One project (the "startup" project) has a "Configuration Type" of "Application (.exe)". The other 40 projects have a "Configuration Type" of "Static Library...
0
by: Chris Stankevitz | last post by:
I use Microsoft Visual Studio C++ 2003 .net 7.1.3088 I have a very large "solution" (1 million lines of code) with about 60 "projects". I use fast solution build to prevent slow "up-to-date"...
1
by: Daniele | last post by:
I have to create a report, that contains in the section body a list of record. For every record it has to appear an incremental additional field that begins from One; when he reaches the record...
5
by: orabalu | last post by:
Hi Guys, Can you give me some examples for Incremental load in PL/SQL for Datawarehouse projects. Regards, Balu
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.